Syntax |
DlgFocus ControlName$ | ControlIndex |
Description |
Sets focus to the specified control. |
Comments |
A runtime error results if the specified control is hidden, disabled, or nonexistent. The ControlName$ parameter contains the name of the .Identifier parameter associated with a control in the dialog box template. A case-insensitive comparison is used to locate the specific control within the template. Alternatively, by specifying the ControlIndex parameter, a control can be referred to using its index in the dialog box template (0 is the first control in the template, 1 is the second, and so on). |
Example |
This code fragment makes sure the user enters a correct value. If not, the control returns focus back to the TextBox for correction. Function DlgProc(ControlName$,Action%,SuppValue%) As Integer If Action% = 2 and ControlName$ ="OK" Then |
|
Sub Main() Dim ListBox1$() |
See Also |
DlgEnable (function); DlgEnable (statement); DlgFocus (function); DlgListBoxArray (function); DlgListBoxArray (statement); DlgSetPicture (statement); DlgText (statement); DlgText$ (function); DlgValue (function); DlgValue (statement); DlgVisible (statement); DlgVisible (function). |
D |