Exemplo n.º 1
0
 public static extern bool GetWindowInfo(IntPtr hwnd, ref WindowInfo info);
Exemplo n.º 2
0
 public static WindowInfo GetWindowInfo(IntPtr hwnd)
 {
     WindowInfo wnfo = new WindowInfo();
     wnfo.cbSize = Marshal.SizeOf(wnfo);
     if (!Api_User32.GetWindowInfo(hwnd, ref wnfo))
         throw new Win32Exception(Marshal.GetLastWin32Error(), "Unable to retrieve window information.");
     return wnfo;
 }