?
Solved

how to determine what events are being raised?

Posted on 2004-09-20
4
Medium Priority
?
147 Views
Last Modified: 2010-04-23
Is there a simple way, or a way at all, in Visual Studio .NET to either see exactly what is happening in response to a user event, or to otherwise return the name of the event being handled? For example, the windows.forms datagrid control has many events. But handling the ones I want to respond to, like Click, doesn't always seem to work as planned. And sometimes it is unclear to me what, if any, events will handle things like the focus moving  (by tab key, for instance), to a different cell in the grid. I would like to see all the events that are being fired so that I can find the best place to put my code that needs to get triggered. I guess I could just put a debugger in every event and see which ones get hit, but I'm hoping that microsoft may have provided a way for this to happen automatically.
Is this pie in the sky?
thanks,
ian
0
Comment
Question by:irashkin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Expert Comment

by:thenrich
ID: 12103990
put a trace.writeline in your events and watch what is happening in the output window. Or if you wanna get fancy do a trace.assert to put a condition on it.
0
 

Author Comment

by:irashkin
ID: 12104138
thanks, but that's what I said I wanted to avoid. (trace, debug, whatever) - the point is, unless I know what events are going to be fired, I have to put a trace in each one, and I don't want to do that. My hope was that microsoft had built a feature to do this automatically instead of me having to code it up by hand.
Any other ideas?
thanks,
ian
"I guess I could just put a debugger in every event and see which ones get hit, but I'm hoping that microsoft may have provided a way for this to happen automatically. "
0
 
LVL 12

Accepted Solution

by:
fulscher earned 1500 total points
ID: 12107513
ian,

I'm afraid there's not such a utility - as far as I know. However, in practice, it isn't as bad. What I usually do if I want to figure out event sequence problems is to eliminate all events which are NOT involved and use WriteLine statement in those few that remain - usually, 2 to 5.

Sorry.

Jan

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question