Manchmal ist es hilfreich, wenn man ein MouseClick simulieren kann.
//namespace
using System.Runtime.InteropServices;
//members
private const UInt32 MouseEventLeftDown = 0x0002;
private const UInt32 MouseEventLeftUp = 0x0004;
//user32 API import
[DllImport("user32", EntryPoint = "mouse_event")]
private static extern void mouse_event(UInt32 dwFlags, UInt32 dx, UInt32 dy, UInt32 dwData, IntPtr dwExtraInfo);
//event call
mouse_event(MouseEventLeftDown, 0, 0, 0, new System.IntPtr());
mouse_event(MouseEventLeftUp, 0, 0, 0, new System.IntPtr());
Kommentare zum Snippet