Guest User

imports

a guest
Jun 21st, 2020
6,831
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. [DllImport("user32.dll")]
  2.         public static extern short GetAsyncKeyState(System.Windows.Forms.Keys vKey);
  3.  
  4.         public static IntPtr handle = FindWindow(null, WINDOW_NAME);
  5.  
  6.         [DllImport("user32.dll")]
  7.         public static extern IntPtr FindWindow(string IpClassName, string IpWindowName);
  8.  
  9.         [DllImport("user32.dll")]
  10.         public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
  11.  
  12.         [DllImport("user32.dll", SetLastError = true)]
  13.         public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
  14.  
  15.         [DllImport("user32.dll")]
  16.         [return: MarshalAs(UnmanagedType.Bool)]
  17.  
  18.         public static extern bool GetWindowRect(IntPtr hwnd, out RECT IpRect);
  19.  
  20.         public static RECT rect;
  21.  
  22.         public struct RECT
  23.         {
  24.             public int left, top, right, bottom;
  25.         }
Advertisement
Add Comment
Please, Sign In to add comment