473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1264
Hi,

The System.Windows.Forms.Application 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.SequenceDiagramEditor.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
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...
1
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...
1
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...
1
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...
2
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...
4
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...
0
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...
0
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
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...
0
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...

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.