Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
LOAD and UNLOAD Statements Example
◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
' This example uses the LOAD and UNLOAD statements with a form.
' To try this example:
' 1. Choose New Project from the File menu
' 2. Choose New Form from the File menu to create a form
' 3. Press Alt+F4 to return to the programming environment
' 4. Copy the code example below to the form module
' 5. Press F5 to run the example
DECLARE SUB LoadUnloadDemo ()
SUB Form_Click ()
CALL LoadUnloadDemo
END SUB
SUB LoadUnloadDemo ()
UNLOAD Form1 ' Unload form
Msg$ = "Form1 has been unloaded. Choose Yes to load and "
Msg$ = Msg$ + CHR$(13) + CHR$(10) "display the form. Choose No to load "
Msg$ = Msg$ + CHR$(13) + CHR$(10) "the form and leave it invisible. "
Answer% = MSGBOX(Msg$, 4) ' Get user response
IF Answer% = 6 THEN ' Evaluate answer
SHOW ' If Yes, show form
ELSE
LOAD Form1 ' If No, just load it
Msg$ = "Form1 is now loaded. Choose OK to display it."
MSGBOX Msg$ ' Display message
SHOW ' Show form
END IF
END SUB