Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Tutorial] - basics ~ loading/unloading frms +multifrm apps
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Pear-i




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: