Example of the GetTitleRectBounds and GetValueRectBounds methods

The following example function displays the rectangle coordinates of the field title and field value in a dialog.

Public Function OnFieldValidate() As Long

Dim left As Long

Dim right As Long

Dim top As Long

Dim bottom As Long

Dim result As Boolean

result = m_oEHCOMAPP.CurrentField.GetTitleRectBounds(left, right, bottom, top)

MsgBox "Title rectangle for field " + FieldName + ":" + Str(left) + ", " + Str(right)

+ ", " + Str(bottom) + ", " + Str(top)

result = m_oEHCOMAPP.CurrentField.GetValueRectBounds(left, right, bottom, top)

MsgBox "Value rectangle for field " + FieldName + ":" + Str(left) + ", " + Str(right)

+ ", " + Str(bottom) + ", " + Str(top)

OnFieldValidate = 0

End Function

The GetTitleRectBounds method

The GetValueRectBounds method

The CurrentField property