Solved

how to make the mouse cursor move??

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 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

18 Experts available now in Live!

Get 1:1 Help Now