Declare Function FileDlgFunction(identifier$, action, suppvalue)
Dim UserInput(4) as string
Sub Main()
Begin Dialog userdialog 130, 88, "INPUT INFO", .FileDlgFunction
TextBox 5, 5, 120, 13, .[b]TextBox1[/b]
TextBox 5, 20, 120, 13, .[b]TextBox2[/b]
TextBox 5, 35, 120, 13, .[b]TextBox3[/b]
TextBox 5, 50, 120, 13, .[b]TextBox4[/b]
OkButton 5, 70, 35, 14
CancelButton 75, 70, 30, 14
End Dialog
Dim mydialog as UserDialog
On Error Resume Next
Dialog mydialog
If Err=102 then
MsgBox "Dialog box canceled."
End If
for x = 1 to 4
msgbox "UserInput "+str(x)+" = "+ UserInput(x)
next
End Sub
Function FileDlgFunction(identifier$, action, suppvalue)
Select Case action
Case 1 'dialog box initialized
Case 2 'button or control value changed
Case 3 'text or combo box changed
UserInput(1) = DlgText$("[b]TextBox1[/b]")
UserInput(2) = DlgText$("[b]TextBox2[/b]")
UserInput(3) = DlgText$("[b]TextBox3[/b]")
UserInput(4) = DlgText$("[b]TextBox4[/b]")
Case 4 'control focus changed
Case 5 'idle
DoEvents
End Select
End Function