This pseudo 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.)
Function MyDlgFunction( identifier, action, suppvalue)
Select Case action
Case 1 'The dialog box is displayed
DlgFocus "MyControl1"
Case 2
' Statements that perform actions based on which control is selected
End Select
End Function