Computing.Net > Forums > Programming > Correct way to End program using VB

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Correct way to End program using VB

Reply to Message Icon

Name: kevster32
Date: September 20, 2004 at 10:31:08 Pacific
OS: XP PRO
CPU/Ram: AMD/512
Comment:

Hello people,

When using visual basic what is the correct way to end your programs:

Unload me

or

End



Sponsored Link
Ads by Google

Response Number 1
Name: Infinite Recursion
Date: September 20, 2004 at 11:53:37 Pacific
Reply:

I use 'Unload me' to terminate various subforms and release those resources.

I use 'End' to terminate my entire application.


0

Response Number 2
Name: Sci-Guy
Date: September 20, 2004 at 18:57:43 Pacific
Reply:

Like I.R. said, Unload Me gor subforms and End to terminate the proggie.



0

Response Number 3
Name: Sci-Guy
Date: September 20, 2004 at 18:59:06 Pacific
Reply:

Damn typo's!!!
"gor" should be "for".



0

Response Number 4
Name: StuartS
Date: September 21, 2004 at 16:15:54 Pacific
Reply:

You should never use End to terminate a VB application. End is a debugging tool and nothing else. It can leave stuff still in memory.

Use Unload.Me. When the last form is unloaded the application will terminate. If it doesn't terminate there is still something loaded, probably a form that has been loaded and hidden. End will not unload it.

End if the software equivalent of pulling the mains plug to turn your computer off.


Stuart


0

Response Number 5
Name: Infinite Recursion
Date: September 21, 2004 at 20:33:31 Pacific
Reply:

I could see where this is a logical problem. In my college years, they told me to use 'End' to terminate the App... I suppose they were wrong. :)


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

dot net c++ file I/O, open/close ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Correct way to End program using VB

The BEST way to learn programming www.computing.net/answers/programming/the-best-way-to-learn-programming/379.html

Client Server Apps using VB 6.0 www.computing.net/answers/programming/client-server-apps-using-vb-60/10580.html

C++ code to limit CPU use? www.computing.net/answers/programming/c-code-to-limit-cpu-use/13645.html