Reputation: 431
I know the location property gives you the location of the control relative to the Winform it is on. But I want to know the x,y coordinates relative to the top left corner of the display, not the Winform.
I had suggestions for using com interop and make an unmanaged call but wanted to know if there was something native to .Net.
Thanks, Dan
Upvotes: 0
Views: 793
Reputation: 50323
What you are looking for is probably the Control.PointToScreen method:
Computes the location of the specified client point into screen coordinates.
The inverse is the Control.PointToClient method, by the way.
Upvotes: 2