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

Username:   Password: 
 RegisterRegister   
 How do you close a form?
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
RaLz




PostPosted: Fri Jun 11, 2004 4:33 pm   Post subject: How do you close a form?

Any1?
Sponsor
Sponsor
Sponsor
sponsor
Brightguy




PostPosted: Fri Jun 11, 2004 4:51 pm   Post subject: Re: How do you close a form?

With the Unload Statement.
RaLz




PostPosted: Fri Jun 11, 2004 7:38 pm   Post subject: (No subject)

lol if it was that easy i woudln't have asked. I use the unload statement but the other forms are still running because i can see my public variables change.
Brightguy




PostPosted: Fri Jun 11, 2004 10:58 pm   Post subject: Re: How do you close a form?

Well accessing any controls on a form reloads it into memory, even if the form isn't visible. So watch out that you aren't doing that... Is that what you are asking? I'm not entirely sure. You should always make sure that all forms are unloaded when you unload the main form, or else your application will remain in memory. You can close all forms and force your application to terminate with the End statement.
RaLz




PostPosted: Sat Jun 12, 2004 7:33 pm   Post subject: (No subject)

well i made a game right and i have two public variables for lives and health. So what you are saying is that because of these two variables the form won't unload?
Tony




PostPosted: Sat Jun 12, 2004 11:38 pm   Post subject: (No subject)

if that is the case, what you could do is create another empty form (or module) that would hold your public variables and you would access global variables though that.
code:

someForm.variable
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Brightguy




PostPosted: Mon Jun 14, 2004 3:20 pm   Post subject: Re: How do you close a form?

Although public variables alone shouldn't prevent a form from unloading...

So when you unload your form, it disappears, but remains in memory? That means when you close all your other forms, your project will still continue running... you'd have to manually hit the End Button to stop it.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: