WinAPI-Wrapper 模拟鼠标点击
用于模拟鼠标移动、点击、窗口操作等的Windows API包装器类。
API
下面是一些可用的方法的总结。有更多的方法和类,比下面列出的要多,但目的是要大致了解包装器能做什么。要查看关于特定方法的详细信息和参数的详细信息,请查看代码本身,因为它的注释很好。
Mouse.cs
public static void LeftClick();
public static void RightClick();
public static void MiddleClick();
public static void LeftDown();
public static void LeftUp();
public static void RightDown();
public static void RightUp();
public static void MiddleDown();
public static void MiddleUp();
public static void Move(int x, int y);
public static void LeftDrag(Point point1, Point point2, int interval, int lag);
Window.cs
public static bool DoesExist(string windowTitle);
public static IntPtr Get(string windowTitle);
public static IntPtr GetFocused();
public static void SetFocused(IntPtr hWnd);
public static bool IsFocused(IntPtr hWnd);
public static void Move(IntPtr hWnd, int x, int y);
public static void Resize(IntPtr hWnd, int width, int height);
public static void Hide(IntPtr hWnd);
public static void Show(IntPtr hWnd);
public static Rectangle GetDimensions(IntPtr hWnd);
public static Size GetSize(IntPtr hWnd);
public static Point GetLocation(IntPtr hWnd);
public static string GetTitle(IntPtr hWnd);
public static void SetTitle(IntPtr hWnd, string title);
public static void Maximize(IntPtr hWnd);
public static void Minimize(IntPtr hWnd);
public static void Normalize(IntPtr hWnd);
public static Bitmap Screenshot(IntPtr hWnd);
public static void RemoveMenu(IntPtr hWnd);
public static void Close(IntPtr hWnd);
public static void DisableCloseButton(IntPtr hWnd);
public static void DisableMaximizeButton(IntPtr hWnd);
public static void DisableMinimizeButton(IntPtr hWnd);
public static void EnableMouseTransparency(IntPtr hWnd);
public static Point ConvertToWindowCoordinates(IntPtr hWnd, int x, int y);
public static Point GetCoordinateRelativeToWindow(IntPtr hWnd);
Desktop.cs
public static Bitmap Screenshot();
public static void HideTaskBar();
public static void ShowTaskBar();
public static int GetWidth();
pu
1