formNonModalShow.vrf.annotated

#

This event handler fires when this form becomes the active form.

BEGSR formNonModalShow Activate
#

Assign this form's textbox value from the global variable.

    textboxCustomerName.Text = Global_CustomerName
#

Increment the counter to help illustrate how state can be persisted for a form.

    Counter = Counter + 1
    labelTimesCalled.Caption = 'Times shown' + %CHAR(%EDITC(Counter, '1'))  
ENDSR
#

Hide this form--it stays in memory and its state persists.

BEGSR buttonHide Click
    Hide *This 
ENDSR
#

Unload this form from memory--its state doesn't persist.

BEGSR buttonUnload Click
    Unload *This 
ENDSR
#

This event fires when the text in the textbox change. This change occurs on each character change.

BEGSR textboxCustomerName Change
#

Uncomment this line to see how this form can change a property on the calling program.

#

Note how the code in this form is changing a property on a different form. The formMain's textboxCustomer textbox's text property is changed with the fully naming below (with the syntax parent.object.property).

    formMain.textboxCustomerName.Text = textboxCustomerName.Text 
ENDSR
#

This event fires when immediately when this form is no longer the active form.

BEGSR formNonModalShow Deactivate
#

There isn't anything to do here, but you'll see this event used when the form is displayed with the ExFmt opcode.

ENDSR