By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

Application.Exit

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a

"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 discussion thread is closed

Replies have been disabled for this discussion.