473,598 Members | 3,132 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application Level Events

Hi Everyone,

In asp.net you have the Global.asax file that allows you to handle and exceptions
that have slipped through the net in your code. It also allows you to handle
application level events in a central place.

Is there a similar mechanism for dealing with global events and exceptions
in Windows Forms applications?

If not, what would be the best approach to make sure that any erstwhile unhandled
exceptions are caught and dealt with graciously?

Thanks to anyone who can help

Kind regards

tce

Jul 21 '05 #1
1 1275
Hi,

The System.Windows. Forms.Applicati on class provides an event called
ThreadException that occurs when an untrapped thread exception is thrown.

I use this event to trap unhandled exceptions in my application and display a
message to the user.

--
Rodger Constandse

<http://www.SequenceDia gramEditor.com>
Sequence Diagram Editor - A quick and easy way to draw and edit sequence diagrams

thechaosengine wrote:
Hi Everyone,

In asp.net you have the Global.asax file that allows you to handle and
exceptions that have slipped through the net in your code. It also
allows you to handle application level events in a central place.

Is there a similar mechanism for dealing with global events and
exceptions in Windows Forms applications?
If not, what would be the best approach to make sure that any erstwhile
unhandled exceptions are caught and dealt with graciously?

Thanks to anyone who can help

Kind regards

tce

Jul 21 '05 #2

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

Similar topics

3
1772
by: April | last post by:
Hi, I have a function that needs to run whenever a user clicks on any textbox, listbox or combobox on any input forms in my application (there are many forms). Background (in case someone has a better suggestion): The forms are all unbound and the datatype and inputmasks are built on the fly. If the user clicks on the control, the cursor is positioned at the end
1
1492
by: thechaosengine | last post by:
Hi Everyone, In asp.net you have the Global.asax file that allows you to handle and exceptions that have slipped through the net in your code. It also allows you to handle application level events in a central place. Is there a similar mechanism for dealing with global events and exceptions in Windows Forms applications? If not, what would be the best approach to make sure that any erstwhile unhandled
1
1604
by: John Martin | last post by:
I've made an .NET application where the contents of a datagrid (dgr1) is changed when the user changes the selection in a drop-down list (drd1). This has works fine as a beginning. Then I want to manipulate the look of the datagrid. I do this in the ItemCreated event, and on the first run (application start) this works as supposed. But when a selection is made in drd1, I find during debugging that the dgr1_ItemCreated event is fired...
1
8067
by: Steve Teeples | last post by:
Can an application manifest document be added to a C# application? If so, can it be done from within the IDE of Visual Studio 2005? I want to customize my application's security level ("Administrator level") and believe it has to be done from within this manifest file that is to be linked into the program. -- ----------- Thanks,
2
4553
by: Ronald | last post by:
I just started with dotnetnuke, and with a wrong login (wrong password on a clean install i can crash the application pool from IIS. (when i login with the right username/password information the site works fine, i can do anything it is supposed to do) I have the following setup: -Windows 2003 x64 (fully patched, clean install) -Dotnetframework 2.0.50727 -Dotnetnuke 4.3.1
4
2170
by: David Lozzi | last post by:
Howdy, I found a nice little book called ASP.NET 2.0 Cookbook by Michael A Kittel and Geoffrey LeBlond. Anyway, they have some instructions on how to setup application level error handling. Most of my functions have try..catch to email me about an error, then I want the application level to fire off to send the user to a custom page AND log it in the app log. When an error occurs on my page, i get a server error Server Error in...
0
981
by: sainin | last post by:
I want to capture (and replay) the keyboard & mouse events for a windows application. This application is written in C# and uses a number of forms and threads. Thankx to the community; I have seen a number of examples which talk about using WinAPIs to capture system level events. Can anyone help me with a link/sample code to achive application specific event capturing. Please mind that I want to replay these events as well.. Thanks.
0
1270
by: sainin | last post by:
I want to capture (and replay) the keyboard & mouse events for a windows application. This application is written in C# and uses a number of forms and threads. Thankx to the community; I have seen a number of examples which talk about using WinAPIs to capture system level events. Can anyone help me with a link/sample code to achive application specific event capturing. Please mind that I want to replay these events as well.. Thanks.
4
1638
by: divy24 | last post by:
I'm new to VB 6.0 as I'm a C# developer originally. I'm working on an application with hundreds of forms spread across multiple projects. Can any VB expert please guide me if there is a way of capturing form-level events at the application level at a common place so that my efforts are reduced? Otherwise, I'll have to make changes at the form level which will be quite cumbersome due to large no. of forms. I need to catch events to keep track of...
0
7985
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
7896
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8389
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
8263
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...
0
5438
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
3896
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
2411
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
1
1503
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1246
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.