SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
WinAPI.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Runtime.InteropServices;
5 
6 namespace Seci.Helpers
7 {
11  internal static class NativeMethods
12  {
13  [DllImport("User32")]
14  public static extern int ShowWindow(int hWnd, int nCmdShow);
15 
16  [DllImport("User32")]
17  public static extern int IsIconic(int hWnd);
18 
19  [DllImport("User32")]
20  public static extern int MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, [MarshalAs(UnmanagedType.Bool)] Boolean repaint);
21 
22  [DllImport("User32")]
23  public static extern int SetFocus(IntPtr hWnd);
24 
25  [DllImport("User32")]
26  [return: MarshalAs(UnmanagedType.Bool)]
27  public static extern bool GetWindowRect(int hWnd, out Rect lpRect);
28 
29  [DllImport("User32")]
30  [return: MarshalAs(UnmanagedType.Bool)]
31  public static extern bool SetForegroundWindow(int hWnd);
32 
33  [DllImport("User32", CharSet = CharSet.Unicode)]
34  public static extern int FindWindow(String lpClassName, String lpWindowName);
35  }
36 
41  internal struct Rect
42  {
43  public int X;
44  public int Y;
45  public int Width;
46  public int Height;
47  }
48 }