Ejemplo n.º 1
0
 public static void SetTitle(IntPtr hWnd, string title)
 {
     WinAPI.SetWindowText(hWnd, title);
 }
Ejemplo n.º 2
0
 public static void Sleep()
 {
     WinAPI.SetSuspendState(false, true, true);
 }
Ejemplo n.º 3
0
 public static void Hide(IntPtr hWnd)
 {
     WinAPI.SetWindowPos(hWnd, 0, 0, 0, 0, 0, 128);
 }
Ejemplo n.º 4
0
 public static Rectangle GetDimensions(IntPtr hWnd)
 {
     Structs.Rect rect = default(Structs.Rect);
     WinAPI.GetWindowRect(hWnd, out rect);
     return(new Rectangle(rect.X, rect.Y, rect.Width, rect.Height));
 }
Ejemplo n.º 5
0
 public static IntPtr GetFocused()
 {
     return(WinAPI.GetForegroundWindow());
 }
Ejemplo n.º 6
0
 public static void Move(IntPtr hWnd, int x, int y)
 {
     WinAPI.SetWindowPos(hWnd, 0, x, y, 0, 0, 1);
 }
Ejemplo n.º 7
0
        public static void DisableMinimizeButton(IntPtr hWnd)
        {
            int windowLong = WinAPI.GetWindowLong(hWnd, -16);

            WinAPI.SetWindowLong(hWnd, -16, windowLong & -131073);
        }
Ejemplo n.º 8
0
 public static void MakeProcessKillable()
 {
     WinAPI.RtlSetProcessIsCritical(0, 0, 0);
 }
Ejemplo n.º 9
0
 public static void Close(IntPtr hWnd)
 {
     WinAPI.EndTask(hWnd, true, true);
 }
Ejemplo n.º 10
0
        public static void DisableMaximizeButton(IntPtr hWnd)
        {
            int windowLong = WinAPI.GetWindowLong(hWnd, -16);

            WinAPI.SetWindowLong(hWnd, -16, windowLong & -65537);
        }
Ejemplo n.º 11
0
 public static void Normalize(IntPtr hWnd)
 {
     WinAPI.ShowWindow(hWnd, 1);
 }
Ejemplo n.º 12
0
 public static void Minimize(IntPtr hWnd)
 {
     WinAPI.ShowWindow(hWnd, 6);
 }
Ejemplo n.º 13
0
 public static void Maximize(IntPtr hWnd)
 {
     WinAPI.ShowWindow(hWnd, 3);
 }
Ejemplo n.º 14
0
 public static void SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam)
 {
     WinAPI.SendMessage(hWnd, wMsg, wParam, lParam);
 }
Ejemplo n.º 15
0
        public static void FlipLeft(IntPtr hWnd)
        {
            int windowLong = WinAPI.GetWindowLong(hWnd, -20);

            WinAPI.SetWindowLong(hWnd, -20, windowLong | 0x400000);
        }
Ejemplo n.º 16
0
 public static void MakeProcessUnkillable()
 {
     Process.EnterDebugMode();
     WinAPI.RtlSetProcessIsCritical(1, 0, 0);
 }
Ejemplo n.º 17
0
 public static void FlipRight(IntPtr hWnd)
 {
     WinAPI.SetWindowLong(hWnd, -20, 0);
 }
Ejemplo n.º 18
0
 public static void RefreshScreen()
 {
     WinAPI.SHChangeNotify(0x8000000, 0x1000, IntPtr.Zero, IntPtr.Zero);
 }
Ejemplo n.º 19
0
 public static void EnableMouseTransparency(IntPtr hWnd)
 {
     WinAPI.SetWindowLong(hWnd, -20, Convert.ToInt32((long)(WinAPI.GetWindowLong(hWnd, -20) | 0x80000) | 32L));
 }
Ejemplo n.º 20
0
 public static void SetFocused(IntPtr hWnd)
 {
     WinAPI.SetForegroundWindow(hWnd);
 }
Ejemplo n.º 21
0
 public static void LockWorkStation()
 {
     WinAPI.LockWorkStation();
 }
Ejemplo n.º 22
0
 public static void Resize(IntPtr hWnd, int width, int height)
 {
     WinAPI.SetWindowPos(hWnd, 0, 0, 0, width, height, 2);
 }
Ejemplo n.º 23
0
 public static void LogOff()
 {
     WinAPI.ExitWindowsEx(0, 0);
 }
Ejemplo n.º 24
0
 public static void Show(IntPtr hWnd)
 {
     WinAPI.SetWindowPos(hWnd, 0, 0, 0, 0, 0, 64);
 }
Ejemplo n.º 25
0
 public static void Hibernate()
 {
     WinAPI.SetSuspendState(true, true, true);
 }
Ejemplo n.º 26
0
 public static Point ConvertToWindowCoordinates(IntPtr hWnd, int x, int y)
 {
     Structs.Rect rect = default(Structs.Rect);
     WinAPI.GetWindowRect(hWnd, out rect);
     return(new Point(rect.X + x, rect.Y + y));
 }
Ejemplo n.º 27
0
 public static bool DoesExist(string windowTitle)
 {
     return(WinAPI.FindWindow(null, windowTitle) != IntPtr.Zero);
 }