Solved

how to make the mouse cursor move??

Posted on 2000-02-23
2
133 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now