Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List all events
Message
From
19/08/2007 11:13:36
 
 
To
19/08/2007 10:33:55
General information
Forum:
ASP.NET
Category:
Testing and debugging
Title:
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01249013
Message ID:
01249015
Views:
11
Hi John,

Do you mean you want to list the order in which the events fire? It's a pain to set up, unless there's a way to do it that I don't know about ... but what I've done in the past is to put code to do Debug.WriteLine() in all the event methods in a base class. That doesn't explain it very well, so here's an example of what I mean:
public class MyForm : System.Windows.Forms.Form
{
	protected override void OnActivated(EventArgs e)
	{
		System.Diagnostics.Debug.WriteLine("Form Activated");
		base.OnActivated(e);
	}
	protected override void OnLoad(EventArgs e)
	{
		System.Diagnostics.Debug.WriteLine("Form Load");
		base.OnLoad(e);
	}
	protected override void OnClosing(CancelEventArgs e)
	{
		System.Diagnostics.Debug.WriteLine("Form Closing");
		base.OnClosing(e);
	}
}
~~Bonnie



>Hi,
>Anyway to list all the events fired (whether handled or not) in .NET, just like how we trap events in VFP?
>
>Thank you
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform