This is the project's modal form displayed with Call.
Form's controls list and their properties.
Project source members:
Declare the entry point and parameter list for this called program.
DclPList *EntryA *String type can't be as a parameter type in a parameter list.
DclParm CustomerName Type(*Char) Len(40)
DclFld Counter Type(*Integer) Len(4)This event handler fires when this form becomes the active form.
BEGSR formModalCall ActivateAssign this form's textbox value from the call/parm parameter. Because this fixed-length field probably has trailing blanks, trim it first.
textboxCustomerName.Text = %TRIM(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'))
ENDSRWhen a CALLed form is hidden, it does NOT stay in memory. For CALLed forms the Hide opcode does exactly the same thing as the Unload opcode.
While Hide or Unload can be used to return from a CALled program, give the potential confusion that Hide could cause in this case, it's probably best to always return from CALLed forms with the Return opcode.
BEGSR buttonHide Click
CustomerName = textboxCustomerName.TextHide *This
Return
ENDSRUnload this form from memory--its state doesn't persist.
BEGSR buttonUnLoad Click
CustomerName = textboxCustomerName.TextUnload *This
Return
ENDSR