public class WinAPIManager
{
[DllImport("user32.dll")]
public static extern bool SetWindowText(IntPtr hwnd, String lpStrjng);
[DllImport("user32.dll")]
public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("user32.dll", EntryPoint = "GetDesktopWindow")]
public static extern IntPtr GetDesktopWindow();
[DllImport("user32.dll")]
public static extern IntPtr GetWindow(IntPtr hWnd, int cmd);
[DllImport("User32.dll", EntryPoint = "GetWindowRect", CharSet = CharSet.Auto)]
public static extern bool GetWindowRect(IntPtr hWnd, out System.Drawing.Rectangle lpRect);
[DllImport("kernel32", EntryPoint = "GetPrivateProfileString")]
public static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
[DllImport("user32.dll", EntryPoint = "FindWindowEx", SetLastError = true)]