Exemplo n.º 1
0
 /// <summary>
 /// liefert das oberste Fenster under der Position
 /// </summary>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <returns></returns>
 public static IntPtr WindowUnderPosition(int x, int y)
 {
     Win32User.Point p = new Win32User.Point()
     {
         X = x, Y = y
     };
     return(Win32User.WindowFromPoint(p));
 }
Exemplo n.º 2
0
 /// <summary>
 /// liefert die Clientkoordinaten zu den Bildschirmkoordinaten
 /// </summary>
 /// <param name="pt"></param>
 /// <returns></returns>
 public Point ScreenToClient(Point pt)
 {
     Win32User.Point winpt = new Win32User.Point()
     {
         X = pt.X,
         Y = pt.Y
     };
     if (Win32User.ScreenToClient(hWnd, ref winpt))
     {
         return(new Point(winpt.X, winpt.Y));
     }
     return(Point.Empty);
 }