DelphiFAQ Home Search:

Simulate a mouse click on our form (control)


comments3 comments. Current rating: 5 stars (2 votes). Leave comments and/ or rate it.

This is easily done by position the mouse cursor onto the form using SetCursorPos, then using mouse_event to fake a mouse click.

  // click in upper-left corner, 50 pixels inward
  SetCursorPos (Form1.Left+50, Form1.Top+50);
  mouse_event (MOUSEEVENTF_LEFTDOWN, 0,0,0,0);
  mouse_event (MOUSEEVENTF_LEFTUP, 0,0,0,0);


2007-08-10, 22:36:14 from Mexico  
muchas gracias, me sirvió bastante el codigo
2007-11-23, 11:40:49   (updated: 2007-11-23, 11:43:10)
AllHappyDates from Portugal  
rating #1 Dating site. Dating, flirt, sex. Post your profile, upload some photos and good luck. is all you need.

2009-12-27, 13:10:12




NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: