Click here to Skip to main content
13,771,389 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all :)

I'm trying to replay a set of coordinates to make my cursor move about the form (every timer_tick). - This I have done successfully... However, is there any way to play these coordinates even when the form is minimzed - is there any may to create another cursor for each form that I have open to carry out the coordinate instructions? This is the code that I have so far:
Dim P As New Point(MouseX.SelectedItem, MouseY.SelectedItem)
Cursor.Position = Me.PointToScreen(P)

This will use the main system cursor to carry out tasks in the form. In order to make what I am asking more possible, I have ensured that the coordinates refer to the coordinates of the form, rather than the screen itself (i.e. if one were to move to cursor to the top left of the form, the coordinate would be '0, 0').

Replaying these coordinates with a duplicate of the main cursor is the only task remaining before the completion of my personal project, I hope it's possible xD

So how can I do this?
Thanks for any help

What I have tried:

Everything - I've tried pictureboxes, for example, to replicate a cursor in the form, however this is not a solution as, even though the picturebox looks like the cursor and can move like the cursor, it does not share the same properties, for example being able to click, or getting a mouse_hover graphical response when it moves over a button. Possible solution if this were possible? I don't know :|
Posted 9-Nov-17 13:02pm
Ralf Meier 10-Nov-17 3:40am
Hi Hellboy,
I'm sorry but I don't understood your issue. Perhaps you explain it (for me) once more.
Basicly I suggest you to work with the Control-Events in the same way as I suggested in my 1st Solution of the other question from you.
But what do you mean with "minimized Form" ?
kkdxghlctlcxxtidyuum 10-Nov-17 11:37am
Hi there!

Thanks for the help on the other question, thanks to you, that problem is now resolved :) However, this is a different issue altogether. Currently, I'm able to record a set of coordinates and clicks and play them back using the system pointer (cursor). However, even though this is a small part of my project, if I ever wanted to distribute it at all, I wouldn't want my users being able to manipulate my project to carry out malicious tasks. This is potentially made possible by the fact that the cursor is not confined to the form only. There are other reasons for what I want to do too.

So, to be clear, this is what I want to be able to do:
Playback the cursor movement and clicking activity in the form only, but more importantly, not having the main system cursor carry out this activity, as I'd like to playback the series of coordinates and clicks in multiple forms simultaneously even if the forms are minimized.

If you don't understand, please say! I'm not great at explaining things.

Thanks for the help last time, and thanks for the help today!! :)

PS: So an alternative method of phrasing: I want the recorder mouse cursor movement and clicking to occur within many of my forms, in the background...
Ralf Meier 10-Nov-17 16:41pm
The part of the recording was understood by me - that was my 1st thought.
The part I didn't understand is what you wrote with the PictureBox and the minimized Form. I could imagine this :
You want to move a Control like the Cursor before and you want to have that this Control does the same interaction with the involved 'real' Controls. Am I right so far ?
If Yes : your Control (completly independent which kind of Control you use) will never do the same to your Controls as the Mouse-Cursor because the all the Mouse-Actions are directly part of each Control. But what you can do is (as example for MouseHover) :
You can identify the Control over which you currently are. Inside this Control you can 'call' the MouseHover-Method - perhaps that realizes the same behaviour. Could this be a Solution ?
kkdxghlctlcxxtidyuum 10-Nov-17 18:26pm
Yeah, I think you have the right idea. However I really need an actual cursor to be operating within each form at the same time, rather than your described solution. I heard somebody say a while ago "nothing's impossible with programming" - I think this may be an exception?


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.181119.1 | Last Updated 9 Nov 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100