Solved

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

Posted on 2013-12-06
5
403 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

896 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