Home All Groups Group Topic Archive Search About

How to programatically envoke mouse button click

Author
9 May 2007 9:32 PM
jim1800
I can move mouse by System.Windows.Forms.Cursor.Position = new
System.Drawing.Point(x,y), but I could not find a way to invoke mouse click.
Thanks for help.
Jim

Author
9 May 2007 11:33 PM
ClayB
You can use interop to access the SendMessage win32 API to send a
mousedown/mouseup message.

http://www.syncfusion.com/faq/windowsforms/Search/875.aspx

===================
Clay  Burch
Syncfusion, Inc.
Author
10 May 2007 3:02 AM
Walter Wang [MSFT]
Hi Jim,

Please refer to following document for more information:

#How to: Simulate Mouse and Keyboard Events in Code
http://msdn2.microsoft.com/en-us/library/ms171548(VS.80).aspx


Let me know if this helps or not.


Regards,
Walter Wang (waw***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

AddThis Social Bookmark Button