Question

I'm using the Spy++ for my work with the MS UI Automation Framework, so i wanted to ask you if you know how the search / highlighting gui elements from the spy++ works.

i'm talking about this: http://i.stack.imgur.com/5m1G4.png

you cant see the mouse on the screen, but if you press the left mouse key over a ui component he can read and highlight all the information. I'm sure he uses the fromPoint() function to find the component under the mouse:

System.Windows.Point point = new System.Windows.Point(Cursor.Position.X, Cursor.Position.Y);
AutomationElement element = AutomationElement.FromPoint(point);

but i cant tell how he draws the border. is there a pattern / function in the ui framework ? couldnt find something like this in the framework api only a way with win32 ( ? )

Was it helpful?

Solution

The rectangle is probably "drawn" on top of the screen using the BoundingRectangle property.

(Just a guess).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top