I have identified a problematic window in Spy++
. Spy++
gives some information about the WinForms window
. Unfortunately, the title is blank, but there is also a window handle, and instance handle, and some other information.
The program is run from VS2017 attached to the debugger. How can I use the information given by Spy++
to find the object in VS2017
?
My reputation is low so post an answer here, also cannot post images:(.
Theoretically you should see the caption in the Windows View. Then you can use this variable name in your VS watch window.
If you cannot see the caption or it's empty, you can also use the handle to get the control using Control.FromHandle(IntPtr) Method. For example, I have a button control with handle 0000000000040E4A, I can get the control via Control.FromHandle(new IntPtr(0x40E4A)) in the watch window.
Best Regards,
Charles