|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Application.ExitI 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 "vul" <a**@optonline.net> schrieb: Try closing the application's main form by calling its 'Close' method.>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? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Thank you.
Unfortunately everything is the same with using MDIMain.Close Al Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:edpBDc3fGHA.3572@TK2MSFTNGP04.phx.gbl... > "vul" <a**@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/> 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 Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:edpBDc3fGHA.3572@TK2MSFTNGP04.phx.gbl... > "vul" <a**@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/>
Show quote
Hide quote
"vul" <a**@optonline.net> wrote in message Are you connected to a database or something and haven't closed/disposed the news:uebf1U4fGHA.452@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]" <hirf-spam-me-here@gmx.at> wrote in message > news:edpBDc3fGHA.3572@TK2MSFTNGP04.phx.gbl... >> "vul" <a**@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/> > > connection yet? Mythran
Porting VB6 to .Net - DDE replacement?
scope of command and garbage collection Binding currencyManager and dataRelation - datagridview - possible Object from variable Question about a conversion project Need help with Conversion from C# to VB.net text align Inline SQL vs stored procs on SQL Server 7 and 2000 Alternate Name Looping through Dataset |
|||||||||||||||||||||||