472,796 Members | 1,459 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,796 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 24769
"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: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.