[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2013-12-06
5
Medium Priority
?
425 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 2000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

650 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