Sub Globals
Dim controls(0)
End Sub
Sub App_Start
Form1.Show
Msgbox(IsEmpty)
ClearAllTextboxes
Msgbox(IsEmpty)
End Sub
Sub ClearAllTextboxes
controls() = GetControls("form1")
For i = 0 To ArrayLen(controls()) - 1
If ControlType(controls(i)) = "TextBox" Then 'note that the control type is case sensitive.
Control(controls(i), Textbox).Text = ""
End If
Next
End Sub
Sub IsEmpty
controls() = GetControls("form1")
For i = 0 To ArrayLen(controls()) - 1
If ControlType(controls(i)) = "TextBox" Then
If Control(controls(i), Textbox).Text <> "" Then Return False
End If
Next
Return True
End Sub