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)]
// 函数说明:在窗口列表中寻找与指定条件相符的第一个子窗口
08-19
1171
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交