Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Visual Basic: Unload Your Application Correctly!
ViRuaL
post May 12 2005, 09:01 PM
Post #1


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 19
Joined: 12-May 05
Member No.: 5,018



What many of us do not know is that using a button on a form with the function "Unload Form1" or even clicking the X in the upper right corner is like pulling the plug out of your computer while it is still on. It may not exit the program cleanly and efficiently, may leave background processes running, or just give you unwanted errors by exiting improperly.

All you need to do is unload all components, forms, controls, etc. upon unloading. Say you have 2 forms in your project, 1 component, and 2 controls. If these ojects are placed onto a form, unload them properly! For instance-

CODE
Private Sub Form_Unload()
Unload Form1
Unload Form2
Unload Component1
Unload Control1
Unload Control2
End Sub


This will make sure that all objects are properly unloaded instead of "dumping" them when you exit the program.

Hope this helped you.
Go to the top of the page
 
+Quote Post
iGuest
post Jan 18 2008, 05:23 AM
Post #2


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



Thanks for this tip. I have just finished a Clinical Database Management Software for GPs and forgot to include this feature. Now I have rectified it and thanks again

-dick.Tracy007
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. [visual Basic] How To Confirm A Array Is Null(6)
  2. Visual Basic Help(7)
  3. VB.NET: How To Find Application Build Version(4)
  4. Visual Basic: Replace Explained!(4)
  5. Visual Basic: Change Your Start Button Text! (XP)(16)
  6. Visual Basic: Random Strings!(10)
  7. Visual Basic 6 + Crystal Reports 9(6)
  8. Visual Basic Names(11)
  9. New Features In Visual Studio 2005 Windows Forms(1)
  10. Visual Basic.NET Help Needed.(7)
  11. Is There A Free IDE For VB.NET Programming?(4)
  12. Need A Barcode Scanner Application(8)
  13. Visual Basic Express Tutorials(5)
  14. [help] Visual Studio .net 2005 Questions(8)
  15. Installed Internet Explorer 7?, Visual Basic Now Broken?(3)
  1. Visual Basic Projects: Scoreboard(0)
  2. Delete A Registry Subkey And Key(8)
  3. Necklace Problem In Visual Basic(3)


 



- Lo-Fi Version Time is now: 16th October 2008 - 04:07 AM