Computer Science Canada

[Tutorial] - basics ~ loading/unloading frms +multifrm apps

Author:  Pear-i [ Fri Jan 30, 2004 3:03 pm ]
Post subject:  [Tutorial] - basics ~ loading/unloading frms +multifrm apps

Basic Form Load / Unload

Load.frmName
'~Loads frmName from the current form

Unload.frmName
'~unloads frmName from App (you can also use Unload Me)

Basically you can do this for *SOME* simple multi form applications too, the only thing about this method is everytime you start the program all frms are already loaded
When you unload however, you're pulling it back out of hte memory. Hence if your application loads back and forth/has a lot of frms, its suggested use this method.

frmName.Hide 'Hides frmName
frmName.Show 'Shows frmName

By using This method, your application will use the forms that it has loaded when you start your program. And instead of going back and forth,
it simply hides the form, and displays the other. Every thing is sourced rom the memory.

Note - when you do this, and you have variable initializations/proceedures/functions in the Form Load,
they will only load once.

To bypass this problem you must go to the Code screen,
top right pulldown menus where it says Load and go down to Activate

paste your code there.

Now all your variables/proceedures/functions will initialize whenver
it is shown or 'activated'

hope thats helpful


: