DlgNumber Function

Syntax:

DlgNumber(DlgItem$)

Group:

Dialog Function

Description: 

Returns the number of the DlgItem$. The first item is 0, second is 1, etc.
This instruction/function must be called directly or indirectly from a dialogfunc.

Parameters:

Parameter

Description

DlgItem$

This string value is the dialog item's field name.

Example:

Sub Main
  Begin DialogUserDialog 200,120,.DialogFunc
  Text 10,10,180,15,"Please push the OK button"
  TextBox 10,40,180,15,.Text
  OKButton 30,90,60,20
  EndDialog

  Dim dlg As UserDialog
  Dialog dlg
End
Sub

Function DialogFunc%(DlgItem$, Action%, SuppValue%)
  Debug.Print "Action=";Action%
  Select Case Action%
  Case 1 ' Dialog box initialization
  Beep
  Case 4 ' Focus changed
  Debug.Print DlgItem$;"=";DlgNumber(DlgItem$)
  EndSelect
End
Function