473,624 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Spy On .NET Events

A general question and a specific one.

1. Is there a Spy utility that shows events for a .NET application
2. What events are fired when calling Form.Show()
?
Nov 1 '07 #1
10 3617
On Nov 1, 8:39 am, Martijn Mulder <i@mwrote:
A general question and a specific one.

1. Is there a Spy utility that shows events for a .NET application
2. What events are fired when calling Form.Show()
?
I have a similiar requirement and have not found a good solution. I
have submitted a request to Dino Dino Dino Esposito of MSDN. If I get
something back, I will post it here.

Colby

Nov 1 '07 #2
If there was a spy utility, it would have to hook into the CLR itself
(and probablys low down your app in the process, as it would use the
debugging hooks, most likely) to find when events are fired. AFAIK, there
isn't any such thing.

There might be solutions which work by requiring you to place code in
the event firing sites, but I doublt that is what you are looking for.

When calling the Show method on a Form, the Shown event will be fired if
it is the first time the form is shown. The VisibleChanged event can be
fired if the form is hidden as well. The Activate event can also be fired
as well, I believe.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Colby Africa" <co**********@g mail.comwrote in message
news:11******** **************@ o80g2000hse.goo glegroups.com.. .
On Nov 1, 8:39 am, Martijn Mulder <i@mwrote:
>A general question and a specific one.

1. Is there a Spy utility that shows events for a .NET application
2. What events are fired when calling Form.Show()
?

I have a similiar requirement and have not found a good solution. I
have submitted a request to Dino Dino Dino Esposito of MSDN. If I get
something back, I will post it here.

Colby

Nov 1 '07 #3
"Martijn Mulder" <i@mwrote in message
news:47******** *************** @news.wanadoo.n l...
>A general question and a specific one.

1. Is there a Spy utility that shows events for a .NET application
2. What events are fired when calling Form.Show()
?

Events are nothing more than Windows Messages posted to the Message Queue of
the owning thread of a Window. If you want to view the messages posted to a
specific application/thread/window, you can use is Spyxx.exe included with
VS2005 (Check Common7\tools).

Willy.

Nov 1 '07 #4
On Nov 1, 3:25 pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
1. Is there a Spy utility that shows events for a .NET application
2. What events are fired when calling Form.Show()
?

Events are nothing more than Windows Messages posted to the Message Queue of
the owning thread of a Window. If you want to view the messages posted to a
specific application/thread/window, you can use is Spyxx.exe included with
VS2005 (Check Common7\tools).
Well, they *may* be Windows Messages - but not all events will involve
that. It's worth the OP being clear about the different between .NET
events and Windows Messages.

Jon

Nov 1 '07 #5
"Jon Skeet [C# MVP]" <sk***@pobox.co mwrote in message
news:11******** *************@o 38g2000hse.goog legroups.com...
On Nov 1, 3:25 pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
1. Is there a Spy utility that shows events for a .NET application
2. What events are fired when calling Form.Show()
?

Events are nothing more than Windows Messages posted to the Message Queue
of
the owning thread of a Window. If you want to view the messages posted to
a
specific application/thread/window, you can use is Spyxx.exe included
with
VS2005 (Check Common7\tools).

Well, they *may* be Windows Messages - but not all events will involve
that. It's worth the OP being clear about the different between .NET
events and Windows Messages.

Jon

True, I have no idea what he meant with Q #3 , Q #1 needs some
clarification, but #2 makes me think he's after the "Windows" Events.

Willy.
Nov 1 '07 #6
On Nov 1, 4:21 pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
True, I have no idea what he meant with Q #3 , Q #1 needs some
clarification, but #2 makes me think he's after the "Windows" Events.
Possibly - or possibly the events that he might be able to subscribe
to, only some of which will relate to Windows events. It's unfortunate
that "event" is a fairly overloaded word :(

Jon

Nov 1 '07 #7
Liz
>>Events are nothing more than Windows Messages posted to the Message
Queue
of
the owning thread of a Window. If you want to view the messages posted
to a
specific application/thread/window, you can use is Spyxx.exe included
with
VS2005 (Check Common7\tools).

I don't see any Spy*.exe files in my \Common7\* folders; I have VS 2005
Pro; is there another location?
Nov 1 '07 #8
"Liz" <li*@tiredofspa m.comwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>
>>>Events are nothing more than Windows Messages posted to the Message
Queue
of
the owning thread of a Window. If you want to view the messages posted
to a
specific application/thread/window, you can use is Spyxx.exe included
with
VS2005 (Check Common7\tools).


I don't see any Spy*.exe files in my \Common7\* folders; I have VS 2005
Pro; is there another location?

Spyxx.exe should be in Common7\tools if you did install the tools during
VS2005 set-up.

Willy.

Nov 1 '07 #9
"Jon Skeet [C# MVP]" <sk***@pobox.co mwrote in message
news:11******** **************@ k79g2000hse.goo glegroups.com.. .
On Nov 1, 4:21 pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
>True, I have no idea what he meant with Q #3 , Q #1 needs some
clarificatio n, but #2 makes me think he's after the "Windows" Events.

Possibly - or possibly the events that he might be able to subscribe
to, only some of which will relate to Windows events. It's unfortunate
that "event" is a fairly overloaded word :(

Jon

Overloaded is the least I can say, it's sometimes really confusing and
utterly wrong to use "Event", IMO we'll have to wait for the OP to come to
rescue and help us out of this ;-)

Willy.
Nov 1 '07 #10

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

Similar topics

3
2027
by: Sasha | last post by:
Hi everyone, Here is my problem: I have the following classes: - DataNode - this class is designed to hold some data and will be contained in a tree like data structure DataTree. When DataNode is changed, it raises "Changed" event. The class has a reference to the DataNode it is being contained in: - DataTree - tree like data structure that contains DataNodes; When
6
13237
by: Saso Zagoranski | last post by:
Hi! How can I unregister all the events registered to a control? I have seen a piece of code in another thread, which gets all the registered handlers for a specific event. Let's say I have a CustomTextBox : TextBox, which has quite a lot of events... Do I put unregistering code for all the possible events in the Dispose method? Or is there another way?
14
12115
by: JPRoot | last post by:
Hi I use the following syntax to have events inherited from base to child classes which works nicely (virtual and override keyword on events). But I am wondering if it is a "supported" way of using events since I never saw it used anywhere in MSDN documentation/samples?! Or it will just break when I upgrade to .NET Framework 2.x in the coming years namespace MyNamespac public delegate void MyDel() public class MyBase public virtual...
2
1846
by: Bob Rundle | last post by:
I have the following code, which appears to be working. However it doesn't look right. The part I am wondering about is the logic in DisconnectEvents(). This logic creates a new delegate and then expects to find that delegate in the list of event handlers. What is the proper way of writing this? Regards, Bob Rundle
4
22874
by: LP | last post by:
Hello! I am still transitioning from VB.NET to C#. I undertand the basic concepts of Delegates, more so of Events and somewhat understand AsyncCallback methods. But I need some clarification on when to use one over another? If anyone could provide any additional info, your comments, best practices, any good articles, specific examples, etc. Thank you
11
1859
by: Nicky Smith | last post by:
Hello, I'm studying a book on VB.net Win apps, and I'm reading a section on events and delegates and raising events. Is it just me, or is this not just subs dressed up as something else? I mean, for one, delegates point to subs, so when you call a delegate, why not just call the sub dierectly and not bother adding the extra code involved adding the delegate?
30
3634
by: Burkhard | last post by:
Hi, I am new to C# (with long year experience in C++) and I am a bit confused by the language construct of events. What is it I can do with events that I cannot do with delegates? At the moment it seems to me that Microsoft has developed similar functionality via two keywords. I do understand that an event offers better encapsulation as the underlying delegate is private, but is that all ? -- Regards
5
4373
by: Richard Maher | last post by:
Hi, Here I mean "User" in the Programmer or Javascript sense. I merely wish to programmatically trigger an Event. It would be absolutely fantastic if there was a (Form level?) ONUSEREVENT() and a setEvent() function but, in the absence of this, is it not possible to use DOM to change an object's properties resulting in a state-change event? I have tried with ONCHANGE() and that only seems to work if the "interactive" user changes the...
14
2205
by: xoozlez | last post by:
Hi there, I have a registration form where I like to filter out the past events of 2007. This is the code I am using : strSQL = "SELECT EventID, EventName, EventDateBegin, EventDateEnd, EventTimeBegin, Category FROM Events WHERE EventDateBegin >'01/01/2008' AND Events.Category LIKE '3' OR Events.Category LIKE '4' OR Events.Category LIKE '5' OR Events.Category LIKE '6' OR Events.Category LIKE '7' OR Events.Category LIKE '8' OR...
1
4895
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
0
8233
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
8675
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...
1
8334
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8474
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
7158
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
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
4173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2604
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
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.