Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there UI inspector tool similar to hawkeye that works with .net 4.5?

I'm working with a winforms application that is targeting .net 4.5 and I really need to inspect the UI elements. I've used Snoop to inspect wpf elements in the past, and I've come across Hawekeye as well. However, it appears hawkeye is not compatible with .net 4.5. Are there any tools out there than can give me similar results?

like image 436
JeremyJayG Avatar asked May 02 '13 16:05

JeremyJayG


4 Answers

Seems like the old tools no longer work like UI Spy either. Microsoft have an Inspect tool available here (Inspect tool). It's part of the Win8 SDK.

I'm looking at the same problem myself today, so will be trying it shortly.

like image 81
MikeyTT Avatar answered Nov 12 '22 23:11

MikeyTT


There is Hawkeye 2 (https://github.com/odalet/Hawkeye2). It works for me with .NET Framework 4.5.

like image 38
riQQ Avatar answered Nov 13 '22 00:11

riQQ


Try the nuget package: WinForm.Inspector.Tool

Setup documentation

  • Instantiate the Inspector in your project.

    Inspector inspector = new Inspector();

  • Ignore specific controls ex. buttons.

    inspector.IgnoreTypes = new Type[] { typeof(Button) };

  • Skip controls ex. invisible and disabled.

    inspector.SkipChilds = GetChildAtPointSkip.Invisible | GetChildAtPointSkip.Disabled;

Run your project and press Ctrl + F8 to open the ControlViewer.

Hold down Alt and move your mouse over the controllers to select them.

enter image description here

like image 2
user3389475 Avatar answered Nov 12 '22 23:11

user3389475


There is Spy++.exe within Microsoft Visual Studio, very useful and works like that.

like image 1
T.Todua Avatar answered Nov 13 '22 00:11

T.Todua