473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Best way to end and application in VB.NET

When a user clicks File exit in a VB.NET application.........

What would be the best way to end the application after the normal cleanup
stuff specific to the application?
Jul 21 '05 #1
6 24856
"mcsdguru" <mc******@discussions.microsoft.com> wrote in message
news:DA**********************************@microsof t.com...
When a user clicks File exit in a VB.NET application.........

What would be the best way to end the application after the normal cleanup
stuff specific to the application?


Closing the form that was opened by Application.Run should do it.
Jul 21 '05 #2
> What would be the best way to end the application after the normal cleanup
stuff specific to the application?

What normal cleanup stuff?

With a (normal) ShowDialog form
me.dispose

With a (normal) Show form
me.close

Every non modal form implements Idisposable.

Therefore that would be enough.

Cor
Jul 21 '05 #3
By normal cleanup I mean.....Making sure the application does not end
abruptly and that all the loose ends are tied prior to exiting the
application.

I mean should I use Dispose, Close or End to close out the application after
all processing is completed?

Thanks.

"Cor Ligthert" wrote:
What would be the best way to end the application after the normal cleanup
stuff specific to the application?

What normal cleanup stuff?

With a (normal) ShowDialog form
me.dispose

With a (normal) Show form
me.close

Every non modal form implements Idisposable.

Therefore that would be enough.

Cor

Jul 21 '05 #4
Or even Application.Exit

"Cor Ligthert" wrote:
What would be the best way to end the application after the normal cleanup
stuff specific to the application?

What normal cleanup stuff?

With a (normal) ShowDialog form
me.dispose

With a (normal) Show form
me.close

Every non modal form implements Idisposable.

Therefore that would be enough.

Cor

Jul 21 '05 #5
mcsdguru,

Depends normally your program itself is just me.close in VBNet when it is
not done by the user clicking on the x. button.

Not me.dispose that is not used from inside an object itself.

And never End, that is not clossing your application however killing your
application.

That is all.

Cor
Jul 21 '05 #6
application.exit is the best way to end a VB.NET application

"mcsdguru" wrote:
Or even Application.Exit

"Cor Ligthert" wrote:
What would be the best way to end the application after the normal cleanup
stuff specific to the application?

What normal cleanup stuff?

With a (normal) ShowDialog form
me.dispose

With a (normal) Show form
me.close

Every non modal form implements Idisposable.

Therefore that would be enough.

Cor

Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim | last post by:
I am doing a small asp webshop and want to make it atleast bi-lingual. I have thought of a few ways to do this but would like to have a second opinion on what you think is the best way. I have...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
2
by: Duncan Welch | last post by:
Good morning, I have a classic ASP app that I'm converting to .NET. In the existing app when accessing infrequntly changed data, it reads a database once a day, and saves the results in an...
4
by: David Pinx | last post by:
Greetings, I will be developing an application that will have two versions, a web application to be deployed at the client side and a windows application. The question is, what would be the...
12
by: neodem | last post by:
PHP, and to a lesser degree JSF has become very popular ways to build web applications. What I don't understand, and what I would like you all to comment on, is how these methods are the best way...
2
by: robert | last post by:
Like many people I am inconvenienced by the fact that files cannot be excluded from an asp.net application. I basically have some text files that are written to by the application and these files...
4
by: =?Utf-8?B?VzFsZDBuZTc0?= | last post by:
When one architects a new project one of the first steps in the decision is to decide on the layers. (In my opinion anyway) One architecture that I have used before is to go solid OO and create...
12
by: MrQuan | last post by:
G'day all, I have a requirement to communicate between two or more PCs over the Internet, however I have no idea how to go about this. I'm not talking about a chat programme as such, I want to...
7
by: Ashutosh Bhawasinka | last post by:
Hi, I have a C# .Net application which needs to use some feature which can be only developed in Visual C++ (its extended MAPI). The C# exe will be supplied to users without a setup. What kind...
0
by: Carl G | last post by:
Hi, I have a question: Is any of Microsoft's databinding code / controls of any use in a real-world MVC application? What is the best way to build an MVC application? For example, is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.