📜  c# postmessage mouse click - C# Code Example

📅  最后修改于: 2022-03-11 14:49:12.130000             🧑  作者: Mango

代码示例1
[DllImport("user32.dll")]
static extern bool PostMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);

const int WM_LBUTTONDOWN = 0x0201;
const int WM_LBUTTONUP = 0x0202;

PostMessage(hWnd, WM_LBUTTONDOWN, 1, 0);
PostMessage(hWnd, WM_LBUTTONUP, 0, 0);