Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simulating Mouse Movements 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
I was trying to find a way to provide OnMouseOver hints on a TChart and found it useful to simulate a mouse click. Here is the code to be able to do this:
Code:
  // to simulate a left mouse button press use this line:
  mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
  // to simulate a left mouse button release use this line:
  mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);

For more information on the mouse_event procedure and related variations see the following link:

Hope this helps!

Clive [infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top