DlgFocus (function)

Syntax

DlgFocus$[()]

Description

Returns a String containing the name of the control with the focus.

Comments

The name of the control is the .Identifier parameter associated with the control in the dialog box template.

Example

This code fragment makes sure that the control being disabled does not currently have the focus (otherwise, a runtime error would occur).

Sub Main()

  If DlgFocus = "Files" Then    'Does it have the focus?
    DlgFocus "OK"             'Change the focus to another control.
  End If
  DlgEnable "Files",False       'Now we can disable the control.
End Sub

See Also

DlgEnable (function); DlgEnable (statement); DlgFocus (statement); DlgListBoxArray (function); DlgListBoxArray (statement); DlgSetPicture (statement); DlgText (statement); DlgText$ (function); DlgValue (function); DlgValue (statement); DlgVisible (statement); DlgVisible (function).

More information

D