How to perform a Virtual Mouse click C# without using a mouse
I'd like to perform a click in a windows application, without using the real mouse (so I can minimize it). Much like a bot would behave. How would I do this? I think the function you're looking for is PostMessage [DllImport("user32.dll", SetLastError = true)] public static extern bool PostMessage(int hWnd, uint Msg, int wParam, int lParam); You can read more about it here on codeproject , and download a demo project, which sends keystrokes. This method posts messages directly on the input queue associated with the program, based on the process handle you use (hWnd) You can also use this