473,705 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application.Exi t

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.Exi t 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.Exi t.
What is a good approach to terminate the application?

Thank you
Al
May 24 '06 #1
4 4112
"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.Exi t 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.Exi t.
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******** ******@TK2MSFTN GP04.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.Exi t 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.Exi t.
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.Exi t.
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******** ******@TK2MSFTN GP04.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.Exi t 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.Exi t.
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******** *****@TK2MSFTNG P02.phx.gbl...
I added Me.Close in Login form before Application.Exi t.
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******** ******@TK2MSFTN GP04.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.Exi t 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.Exi t.
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
8520
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 condition and if it finds it it notifies the user with a MessageBox and then on the next line of code (example in a minute) it calls Application.Exit(). To my astonishment, I stepped through the code with the debugger, and watched it call...
1
17702
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). The form has a really long loop which generates approx. 700 .csv files. I do not create any threads myself (Application.exitthread() doesn't work either). To counteract this I have decided to use the Environment.exit(-1) method instead. What...
6
20082
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 quite a few words in this post but the questions are actually quite similar and should be fairly quick to answer ... (1) What is Happening with the Threads
1
3798
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 Application::Exit()? Does Application::Exit() terminate only the main thread and background threads, and not the foreground threads?
3
1872
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 . It closes and ends the application, and closes the NotifyIcon I have specified for this application. When I use Application.Exit it closes the form and ends the application but the NotifyIcon doesn't remove itself unless you hover a mouse cursor...
4
10854
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 force the application to exit? See **** below for my comments/questions in a simple example. ****In Sub Main, the Application.Exit works as expected, other sub main code is ignored, and when the end sub is reached the application shuts down....
20
2707
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 contrast to one of them always being 'modal' (e.g., if you are moving over a picture the 'Info' form will update the (x,y) screen location in realtime even if not the selected form. Also note that this example implies the various forms can communicate...
3
2055
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 Task Manager to run the shortcut, I am not able to get rid of (minimize) the DOS window. Is there somebody that is aware of this problem ? My application is an agenda, so Task Manager runs it every 15 minutes, to
7
4312
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 constructor - FormMain() - if this error occurs, I display a message box then call Application.Exit(). The problem is that I also need to have some code in my FormMain_FormClosing event handler, but this prevents Application.Exit() from quitting the...
1
5108
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 fine. But how to do in such following scenario: if I need to give 2 option for user,1. Quit 2. Restart. In Quit option, I use Environment.Exit(0) to confirm the process will be stopped. In Restart option, I can't use Environment.Exit(0) , because...
0
8771
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7895
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6607
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5934
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4705
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3140
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2084
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.