473,394 Members | 1,715 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

Nov 16 '05 #1
1 1480
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

Nov 16 '05 #2

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

Similar topics

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...
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: 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...
6
by: jim | last post by:
Hi All, I like to know the life cycle of an ASP .NET Application( incudieng server application, such as .NET Web Service). That means from initialization to fully running and how to reboot it or...
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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...
0
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...

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.