Click to See Complete Forum and Search --> : cursor control
adam_bailey
May 13th, 2006, 06:16 AM
How do I control the cursor's position and simulate mouse clicks, not just in my program but in others aswell. e.g.
cursor(X,Y,LeftClick,RightClick)
to move cursor(100,300,false,false)
to click cursor(100,300,true,false)
golanshahar
May 13th, 2006, 06:17 AM
Look at this FAQ: How can I emulate mouse events in an application? (http://www.codeguru.com/forum/showthread.php?t=377394)
Cheers
MXPguru
May 13th, 2006, 07:50 AM
What if I have the name of an icon on the Desktop and I want to send a double-click message to the ListView of desktop?
golanshahar
May 13th, 2006, 08:01 AM
What if I have the name of an icon on the Desktop and I want to send a double-click message to the ListView of desktop?
One way is to get the rectangle of the icon so you will know where to set your cursor to before sending the double click.
But bare in mind that the icon can be covered with a window so there need to be some checking before sending the click.
Cheers
MXPguru
May 13th, 2006, 08:12 AM
i'm having some problems with what you're telling. firstly i'm unable to determine which window to send message to. secondly, the icon can be covered.
i want to know if there is any other way.. like what ACTUALLY happens when we click on a desktop icon? so i could do the same within my app. (without moving cursor)
golanshahar
May 13th, 2006, 09:51 AM
Well, you can try getting the path to the file that the icon is linked to and when you want to "lunch" that icon, you can use ::ShellExecute() instead of using mouse clicks.
Just an idea.
Cheers
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.