This fragement of code:
Controls() = GetControls("frmMain")
For i = 0 To ArrayLen(Controls())-1
If ControlType(Controls(i)) = "Label" Then
Control(Controls(i)).Color = cWhite
End If
Next
does not seem to work in my application. During execution the error "If ControlType(Controls(i)) = "Label" Then Error Description: Object reference not set to an instance of an object" is raised.
Types of controls on my form: TabControl, Labels, TextBox, Images and Listbox
Am I overlooking something? Thanks in advance.
Controls() = GetControls("frmMain")
For i = 0 To ArrayLen(Controls())-1
If ControlType(Controls(i)) = "Label" Then
Control(Controls(i)).Color = cWhite
End If
Next
does not seem to work in my application. During execution the error "If ControlType(Controls(i)) = "Label" Then Error Description: Object reference not set to an instance of an object" is raised.
Types of controls on my form: TabControl, Labels, TextBox, Images and Listbox
Am I overlooking something? Thanks in advance.