473,657 Members | 2,449 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to destory the application without getting error msg ?

hi.
i want to destroy the application when i catch some exception.
i have multithread app.

how can i destroy the application and exit immedietly ?
Nov 20 '05 #1
3 1328

"Daylor" <ro******@hotma il.com> schreef in bericht
news:bu******** **@news2.netvis ion.net.il...
hi.
i want to destroy the application when i catch some exception.
i have multithread app.

how can i destroy the application and exit immedietly ?


Application.Exi t() ' the opposite of what you do when you start a windows
forms application Application.Run (New Form1())

Yves

Nov 20 '05 #2
* "Daylor" <ro******@hotma il.com> scripsit:
i want to destroy the application when i catch some exception.
i have multithread app.

how can i destroy the application and exit immedietly ?


Tell the threads, for example by setting a Boolean variable, that they
should terminate, then close the main form.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
you'll need to know all your threads; send them aborts and then exit your
app. that should take everything down.

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "Daylor" <ro******@hotma il.com>
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
Subject: how to destory the application without getting error msg ?
Date: Thu, 22 Jan 2004 20:23:04 +0200
Organization : NetVision InterNetNews site
Lines: 7
Message-ID: <bu**********@n ews2.netvision. net.il>
NNTP-Posting-Host: dsl217-132-37-126.bb.netvisio n.net.il
X-Trace: news2.netvision .net.il 1074795896 12243 217.132.37.126 (22 Jan 2004 18:24:56 GMT)X-Complaints-To: us****@netvisio n.net.il
NNTP-Posting-Date: Thu, 22 Jan 2004 18:24:56 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Path: cpmsftngxa07.ph x.gbl!cpmsftngx a10.phx.gbl!TK2 MSFTNGXA05.phx. gbl!TK2MSFTNGP0 8
.phx.gbl!newsfe ed00.sul.t-online.de!t-online.de!tisca li!newsfeed1.ip .tiscali
.net!news.tele. dk!news.tele.dk !small.news.tel e.dk!news-out.visi.com!pe tbe.vi
si.com!ash.uu.n et!news2.netvis ion.net.il!not-for-mailXref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:175301
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

hi.
i want to destroy the application when i catch some exception.
i have multithread app.

how can i destroy the application and exit immedietly ?


Nov 20 '05 #4

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

Similar topics

5
1579
by: Venky | last post by:
We have a strange error here. We have an application that is built in VC++ 6.0 and uses a C library built using the same. Now, we have migrated to .Net and have used the same source code to be built using the new compiler. What happens now is, that any call that we make to the C library(also built in .Net Env now) from the VC++ Application(built in .Net now), falls prey to a runtime exception and gets into our try catch block. We are...
4
6529
by: Steve B. | last post by:
I think a user exited my local application incorrectly and now I can't compile a new version of the application to the public network without getting a "in use" error message. Also, can't rename or delete the exe file/directory without "access denied" How do I find out who/what is using the exe on my local network? How can I kill the exe process because I don't see it on my machine? How can I prevent this application error from occuring...
0
276
by: tempus | last post by:
I've been working on this application for two months. today i came to work, opened visual studio and build my application. and i started getting the error: > Server Application Unavailable > The web application you are attempting to access on this web server is currently > unavailable. Please hit the "Refresh" button in your web browser to retry your > request. > Administrator Note: An error message detailing the cause of this...
8
1604
by: Shane O'Keeffe | last post by:
Hi, I am getting the following error message when I attempt to create a new ASP.NET (C#) web application: The Web server reported the following error when attempting to create or open the Web projects located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'.
7
634
by: ddd | last post by:
Hi, I am having problems with using the DrawToDC of the MSHTML.iHTMLElementRender in a VB.net application. For some reason I am getting a "catastrophic error". I am basing the code on c# examples, and I am not sure what exactly I am doing wrong. From the C# posts it seems that the drawtodc has a bug and you need to redifine it, so i followed their advice and specified an interface as below:
8
6036
by: mike2036 | last post by:
I have an application (that has unmanaged code) and when I launch it without 'FullTrust' permissions (LocalIntranet_Zone), it crashes. When I set 'FullTrust' permissions, it launches fine. Is there a way I can compile the application such that it won't even attempt to launch without correct permissions instead of just crashing? Thanks for any help. -Mike
35
2196
by: salad | last post by:
I have an application written in MS-Access. It is a complete application that manages the day-to-day operations of a business. The program is nearly ready to be used in other customer sites. I am wondering if any of you have advice on supporting an application. Since it has never had any outside exposure, what I don't want is to make a bunch of sales and not be able to support the issues that arise. I believe as kinks are worked out...
2
10780
by: Ian Boyd | last post by:
We're encountering a situation where we're encountering a deadlock, and someone's been made the deadlock victim. But after that, DB2 refuses to run any SQL, and instead we get the error message: "Application must execute a rollback. The unit of work has already been rolled back in the database but other resource managers involved in this unit of work might not. To ensure integrity of this application, all SQL requests will be rejected...
13
4748
by: Kevin Liebowicz | last post by:
Yes, I wasted the past two days trying to fix this. Yes, this is on a Win2003 Server. Yes, this machine is a domain controller. Yes, I seen the dozens of KB articles like this one: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315158 But the problem is that 99% of these are for ASP .NET 1.x and this is .NET 2.x which I just installed to try and get .net working for the first time ever. I've see all the HACKS to get .net 1.x...
0
8395
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
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6166
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
5632
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
4155
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...
1
2726
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
2
1615
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.