using System; using System.Runtime.InteropServices; using System.Drawing; namespace SystemTools ... { [StructLayout(LayoutKind.Sequential)] public struct RECT ...{ public int left, top, right, bottom; } /**//// <summary> /// 封装API的类 /// </summary> public class APIs ...{ [DllImport("user32.dll")] public static extern bool GetCursorPos(ref Point lpPoint); [DllImport("user32.dll")] public static extern int WindowFormPoint(Point lpPoint); [DllImport("user32.dll")] public static extern IntPtr GetDesktopWindow(); [DllImport("user32.dll")] public static extern int GetForegroundWindow(); [DllImport("user32.dll")] public static extern int GetWindowRect(int hwnd, ref RECT rc); [DllImport("user32.dll")] public static extern int GetWindowDC(int