Example - DlgFocus Function and DlgFocus Statement

This example sets the focus on the control "MyControl1" when the dialog box is initially displayed. (The main subroutine that contains the dialog box definition is not shown.)

  1. Function MyDlgFunction( identifier, action, suppvalue)

    1. Select Case action

      1. Case 1 'The dialog box is displayed

        1. DlgFocus "MyControl1"

        Case 2

        1. ' Statements that perform actions based on which control is selected

      End Select

    End Function