• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 676
  • Last Modified:

how to find out a absolute location with C#?

i have a window's handle, and i want to find out the absolute location of that window to the screen, so i can use my program to do some mouse clicking to that window. anyone can give me examples with C#?
0
karen1982
Asked:
karen1982
  • 2
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
You can use the GetWindowRect() API as in this example to get the absolute screen coordinates of the window:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20527794.html
0
 
Julian HansenCommented:
In C# I think the

System.Windows.Forms.DesktopBounds
System.Windows.Forms.DesktopLocation
System.Windows.Forms.ClientRectangle
System.Windows.Forms.ClientSize

Might be what you are looking for
0
 
Julian HansenCommented:
You should find code samples in the documentation for these methods/properties
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now