473,401 Members | 2,068 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,401 software developers and data experts.

Application.Exit

vul
I start the application with Application.Run(New MDIMain) in Sub Main.
MDIMain is the mdi form which loads and then calls Login form.
I'm using Application.Exit to terminate my VB 2005 application on Login
screen if user clicks on Cancel button.
When I do this I get a sound as MessageBox produces. I do not see any
messages, but VB environment works abnormally after that. It doesn't switch
modules until I minimize it and maximize again or close solution and open
again. I suspect that there is a problem with Application.Exit.
What is a good approach to terminate the application?

Thank you
Al
May 24 '06 #1
4 4064
"vul" <aa*@optonline.net> schrieb:
I start the application with Application.Run(New MDIMain) in Sub Main.
MDIMain is the mdi form which loads and then calls Login form.
I'm using Application.Exit to terminate my VB 2005 application on Login
screen if user clicks on Cancel button.
When I do this I get a sound as MessageBox produces. I do not see any
messages, but VB environment works abnormally after that. It doesn't
switch modules until I minimize it and maximize again or close solution
and open again. I suspect that there is a problem with Application.Exit.
What is a good approach to terminate the application?


Try closing the application's main form by calling its 'Close' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

May 24 '06 #2
vul
Thank you.
Unfortunately everything is the same with using MDIMain.Close

Al

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ed**************@TK2MSFTNGP04.phx.gbl...
"vul" <aa*@optonline.net> schrieb:
I start the application with Application.Run(New MDIMain) in Sub Main.
MDIMain is the mdi form which loads and then calls Login form.
I'm using Application.Exit to terminate my VB 2005 application on Login
screen if user clicks on Cancel button.
When I do this I get a sound as MessageBox produces. I do not see any
messages, but VB environment works abnormally after that. It doesn't
switch modules until I minimize it and maximize again or close solution
and open again. I suspect that there is a problem with Application.Exit.
What is a good approach to terminate the application?


Try closing the application's main form by calling its 'Close' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

May 24 '06 #3
vul
I added Me.Close in Login form before Application.Exit.
Now there is no messagebox like sound and no problem with VS environment
after stopping the application, but there is a delay for about 5-6 seconds
in VS environment. The application disappears from the screen without any
delay, but the button stop in VS environment remains enable for those 5-6
seconds. When I run compiled exe I do not see any problem (maybe it's
hidden)

Thank you
Al
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ed**************@TK2MSFTNGP04.phx.gbl...
"vul" <aa*@optonline.net> schrieb:
I start the application with Application.Run(New MDIMain) in Sub Main.
MDIMain is the mdi form which loads and then calls Login form.
I'm using Application.Exit to terminate my VB 2005 application on Login
screen if user clicks on Cancel button.
When I do this I get a sound as MessageBox produces. I do not see any
messages, but VB environment works abnormally after that. It doesn't
switch modules until I minimize it and maximize again or close solution
and open again. I suspect that there is a problem with Application.Exit.
What is a good approach to terminate the application?


Try closing the application's main form by calling its 'Close' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

May 24 '06 #4

"vul" <aa*@optonline.net> wrote in message
news:ue*************@TK2MSFTNGP02.phx.gbl...
I added Me.Close in Login form before Application.Exit.
Now there is no messagebox like sound and no problem with VS environment
after stopping the application, but there is a delay for about 5-6 seconds
in VS environment. The application disappears from the screen without any
delay, but the button stop in VS environment remains enable for those 5-6
seconds. When I run compiled exe I do not see any problem (maybe it's
hidden)

Thank you
Al
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ed**************@TK2MSFTNGP04.phx.gbl...
"vul" <aa*@optonline.net> schrieb:
I start the application with Application.Run(New MDIMain) in Sub Main.
MDIMain is the mdi form which loads and then calls Login form.
I'm using Application.Exit to terminate my VB 2005 application on Login
screen if user clicks on Cancel button.
When I do this I get a sound as MessageBox produces. I do not see any
messages, but VB environment works abnormally after that. It doesn't
switch modules until I minimize it and maximize again or close solution
and open again. I suspect that there is a problem with Application.Exit.
What is a good approach to terminate the application?


Try closing the application's main form by calling its 'Close' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>



Are you connected to a database or something and haven't closed/disposed the
connection yet?

Mythran

May 25 '06 #5

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

Similar topics

1
by: Guinness Mann | last post by:
Pardon me if this is not the optimum newsgroup for this post, but it's the only .NET newsgroup I read and I'm certain someone here can help me. I have a C# program that checks for an error...
1
by: Brendan Miller | last post by:
I am trying to close my application using Application.exit() in the frmMain_Closing event. When the form closes the process does not. My application only has one form (no other classes either). ...
6
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are...
1
by: Ioannis Vranos | last post by:
I am currently reading a chapter involving multithreading, and some sample code calls Environment::Exit() to terminate the application with all threads. What is the difference from...
3
by: John Wildes | last post by:
Hello All I have an application that has one form. I start the application using a Application.Run(New frmMain) command in Sub Main(). When I exit, the exit menu Item simply does a Me.Close ....
4
by: Bob Day | last post by:
Using VS 2003, VB.net... I am confused about the Application.Exit method, where the help states "This method does not force the application to exit." Aside from the naming confusion, how do I...
20
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in...
3
by: Marcel Saucier | last post by:
I have written a Console Application then created a shortcut to it on my desktop. I was able to minimize the DOS window when I click my shortcut so I dont see anymore the DOS window But, using...
7
by: Jay | last post by:
In my C# code, I'm attempting to display a message box then quit the win form application I'm writing if a certain type of error occurs when the application starts up. In the main form's...
1
by: =?Utf-8?B?VGFvZ2U=?= | last post by:
Hi All, When I use applcation.exit() in winForm application, the form closed, but the process is still going!! ( The debug process is still running if debug in VS IDE). Environment.Exit(0) works...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.