views:

263

answers:

2

I actually don't want it to be a "real" mouse cursor, i.e. no need for ability to click on buttons, select text etc. It should just look like a cursor (or kinda like it) and be able to move around the app's window (no need to go outside). It will be controlled by the computer, and the user should be able to use the mouse as usual during this time.

What's a good way to do something like this? How do I make a floating entity that I can move around the window programmatically?

+4  A: 

If it is a forms application, just create a PictureBox, load a mouse cursor graphic that has a transparent background, and just move it around your form.

jeffamaphone
A: 

If this is a WPF application, then you can do this: Put a Canvas object on your display. Add an image of a mouse cursor as a child of the canvas. Set the Canvas.Left and Canvas.Top properties on the image to move it around. Set the ZOrder of the image so that it appears above all of the other controls.

You don't say how the actions are to be determined. If it is according to a script, then there are ways WPF can handle the timing of the motion for you. Otherwise, you can just update the position by whatever means you want in response to a timer.

Wait a minute. I just noticed this was posted ten months ago.

So what did you end up doing? :)

Jeffrey L Whitledge