c# - send mouseclick message in .net -
I would like to send a mount click from user control with user click when a control is selected in the user control.
I have tried:
private const int MOUSEEVENTF_LEFTDOWN = 0x02; Private Constant MoEEEEEETFLLTTP = 0x04; [DllImport ("user32.dll")] Private static extern zero mouse_events (UInt32 dwFlags, // speed and click option UInt32 dx, // horizontal position or UInt32 dy, // change vertical position or UInt32 dwData, change wheel movement / IntPtr DwExtraInfo // application defined information); Mouse_Auvent (MUEEINTNTLIFT, 0, 0, 0, new system. INTPTR ()); Mouse_Event (MoUEEEENFLLFTTP, 0, 0, 0, New System. INTPTR ());
But I have not had any success in getting the event happening on the parents.
Perhaps there is another way to cascade down for a mouseclick?
Thanks
To trigger the click event, click Control. InvokeOnClick can use
for your parent form.
See this stack overflow for details
Comments
Post a Comment