Solved

how to make the mouse cursor move??

Posted on 2000-02-23
2
137 Views
Last Modified: 2013-11-20
how to create a random mouse cursor-mover??
please help
0
Comment
Question by:armansiu
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 50 total points
ID: 2556220
use mouse_event
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2556250
like this...

int x = ... whatever;
int y = ... whatever;
mouse_event(MOUSEEVENTF_ABSOLUTE,x,y,0,0);

This will move the mouse to the given screen location.

If you want truly random movement, use rand() function and use SystemParametersInfo to get the size of the screen etc so you know the range of mouse positions available.

           
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET how to use the Vertical ScrollBar 5 119
Detect CR LF to each line 12 174
fizzArray2 challenge 1 101
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 1,252
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question