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

Username:   Password: 
 RegisterRegister   
 forms lagging
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
cool dude




PostPosted: Wed Jan 04, 2006 6:30 pm   Post subject: forms lagging

is it possible to fix the forms so they don't lag when u end the program. wat i mean is if u have like 10 forms and then u exit the program the program will not exit smoothly it will exit through each of the forms. also wats more efficient to use

code:

unload me


OR

code:

form1.hide
Sponsor
Sponsor
Sponsor
sponsor
HazySmoke)345




PostPosted: Wed Jan 04, 2006 8:03 pm   Post subject: (No subject)

I'm not sure what do you mean by the "lag". I created a project with 15 forms and the program didn't lag at all. So, since I really wanted to see how it lags, I then created a project with 150 windows. Yes, it does lag a little bit, but, I think it always has to lag to a certain degree because, after all, you're making the computer do a lot of things. But there is another way to end your program, it seems smoother to me. The syntax is:
VisualBASIC:
End

3 simple letters, end your whole project. Try that.
Brightguy




PostPosted: Wed Jan 04, 2006 10:37 pm   Post subject: Re: forms lagging

Remember, Form1.Hide does not unload it from memory. It just hides the form so you can't see it on the screen.

If you forget to unload all forms, you could even have them remain in memory even though it looks like your program has finished.
pavol




PostPosted: Thu Jan 05, 2006 10:54 am   Post subject: (No subject)

what you're talking about is only when you're creating the project, it won't happen when you compile it. try this in your project close all your form and code windows, then run the program, and end it, it shouldn't cycle though all the forms now.
cool dude




PostPosted: Thu Jan 05, 2006 11:16 am   Post subject: (No subject)

HazySmoke)345 wrote:
But there is another way to end your program, it seems smoother to me. The syntax is:
VisualBASIC:
End

3 simple letters, end your whole project. Try that.


umm i don't think u understood my question. i obviously know the command end and i have that when the user clicks on exit the program. now wat i'm was asking is when u have all the forms opened and then u run the program and click on end u will see the program exiting each form until all the forms are ended and then will it only quit the program. i think pavol though is right and it has to do that, and if i close all the forms and run it then it won't lag.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: