Solved

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Technology Resume 7 69
GeoClustering  and AOG 25 43
SQL Server maintenance plan 8 54
How to use Visual Studio's AddArgument method found in the PowerShell Namespace 2 31
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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