Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question 开发者_C百科I want to point with the mouse on an area in my application and know the name of the UserControl.
Hawkeye (seems moved to github) can do that and more. You can see all the properties, fields, events and methods of a control. You can also edit the properties during runtime.
I recommend WinSpy++ because its much easier to get hold of then the original Spy++ which comes as part of the Windows SDK.
Just like Spy++ this only works at the Win32 level, of which WinForms is a thin/medium wrapper.
My favorite (for ease of use) is our modified wfSpy utility.
It is available at my blog: http://www.cplotts.com/2009/10/28/an-ode-to-wfspy/
The original utility is from CodeProject ... but that version doesn't have the ability to drag the mouse on top of a control in your application.
Hawkeye (already mentioned above) is a favorite of mine as well ... more powerful than wfSpy ... but definitely harder to use. wfSpy is great for quick and simple spying (and of course editing of properties on the fly).
I havn't tried it, but there is a tool called ManagedSpy (Article) that might be helpful.
Spy++ allow you to see Window settings and messages, but that works at native (Win32) level, and will not show .NET information.
精彩评论