GetControls
Previous Top Next

Returns an array with the names of all the controls that belong to the specified control.
Syntax: GetControls (Control Name)
Pass an empty string "", to get all the controls available.
Note that Timer, ImageList, OpenDialog, SaveDialog, MenuItem and ArrayList controls will not be returned unless you pass an empty string as the argument.
GetControls returns the module of each control followed by a period and the control's name.

Example:
This example disables all buttons in Form1.
Sub Globals
      Dim names(0)
End Sub

Sub App_Start
      Form1.Show
      names() = GetControls("Form1")
      For i = 0 To ArrayLen(names())-1
            If ControlType(names(i)) = "Button" Then Control(names(i)).Enabled = false
      Next
End Sub