Solved

ASP, VB.net how to properly close a main (form) application

Posted on 2013-12-06
5
394 Views
Last Modified: 2013-12-12
Hi and thanks,

Without going into much detail.

I have a main form and it is being closed by the little X (close) in the upper right corner.

I have noticed that when opening the program it sometimes does not open.

I am guessing that it is because the application is not being closed correctly and that it needs a close button with the recordsets being ended and also a close?  It is mentioned that the MS has a garbage collection that automatically does this?

Thanks
0
Comment
Question by:Amour22015
  • 2
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 500 total points
ID: 39701768
Close the form first, and then dispose of it using Dispose(0 method.

If the form is closed by clicking an x, it should be disposed of without an issue. Perhaps there is a different reason why it does not always open
0
 

Author Comment

by:Amour22015
ID: 39701816
So you are saying that closing with the X does close the application properly and you don't have to worry about the recordsets?  I guess this is one of the reasons for VB.net.  I have more experience with VBA...

Thanks
0
 
LVL 35

Expert Comment

by:YZlat
ID: 39701946
I believe so. But you can also go to form's closing event and put the code there to dispose of the form
0
 
LVL 8

Expert Comment

by:johny_bravo1
ID: 39711865
Hi Amour22015,

ASP, VB.net?

What about ASP here?

The situation you describe is pretty confusing. Whenever you close your program's startup form, the entire application should quit automatically, including closing all other open forms.
(You are using MDI form??)

Alternatively ou can use , Application.exit()
0
 

Author Closing Comment

by:Amour22015
ID: 39715014
Thanks
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now