qck.hlp (Table of Contents; Topic list)
Passing Forms and Controls
                                                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 Passing Forms and Controls
 
 ■ Procedures can accept forms and controls as formal parameters. If passed,
   they must be defined as FORM or CONTROL. For example:
 
         SUB ChangeCaption (NewCap AS FORM, Caption$)
             (statements)...
         END SUB
 
         SUB DoIt (MyControl AS CONTROL)
             (statements)...
         END SUB
 
 ■ All properties and controls can be referenced on a passed form or control
   variable. However, a run-time error occurs if either:
   • The passed form does not contain the referenced control
   • A referenced property does not exist for a passed control parameter
 
 ■ You can use the IF TYPEOF statement to determine the type of control
   passed to a procedure. See: IF TYPEOF Statement