version 5.80 1 Form1 frmDialog 2 3 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 238 268 0 0 0 Sub designer addform(Form1,"Form1","",220,220,220)@ addform(frmDialog,"Dialog","",220,220,220)@ addbutton(frmdialog,Button3,5,175,225,80,"",212,208,200,0,0,0,True,True,11)@ addbutton(frmdialog,Button2,5,90,225,80,"",212,208,200,0,0,0,True,True,11)@ addbutton(frmdialog,Button1,5,5,225,80,"",212,208,200,0,0,0,True,True,11)@ End Sub @EndOfDesignText@Sub Globals ' Enables a user dialog with large buttons (for use without stylus in rugged outside conditions) ' AND possibility To evaluate the selected button in a manner similar to MsgBox ' Miklquick 12.12.2007 Dim BtnNo ' Number of the button pressed: First button:1 etc. End Sub Sub App_Start Form1.Show BtnPressed= DialogForm("Titel","Do 1. alternative","2. alternative","Do third") If BtnPressed=1 Then Msgbox("1. alternative") Else If BtnPressed = 2 Then Msgbox("2. alternative") Else If BtnPressed = 3 Then Msgbox("3. alternative") Else If BtnPressed = 0 Then Msgbox("Break") End If AppClose End Sub Sub DialogForm(Form_title, Button1_text, Button2_text,Button3_text) frmDialog.Show frmDialog.Text=Form_title Button1.Text=Button1_text Button2.Text=Button2_text Button3.Text=Button3_text AddEvent("Button1",Click, "Btn_Click") AddEvent("Button2",Click, "Btn_Click") If Button3_text = "" Then Button3.Dispose Else AddEvent("Button3",Click, "Btn_Click") End If Do DoEvents Loop Until BtnNo <> "" frmDialog.Close Return BtnNo End Sub Sub Btn_Click BtnId = Sender If BtnId="button1" Then BtnNo=1 Else If BtnId="button2" Then BtnNo=2 Else If BtnId="button3" Then BtnNo=3 End If End Sub Sub frmDialog_Close If BtnNo>0 Then Return BtnNo=0 End Sub