Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want add an image near mouse cursor that moves with cursor to use in kinect application (C#). Somebody have any ideas?

Now I have this code, but this is an image in a form. I want an image near cursor that moves when cursor moves.

public void ShowCursorLoadImage()
{
        Form frm = new Form();
        PictureBox pb = new PictureBox() { Image = Image.FromFile(@"C:\Users\bfernandes\Documents\KinectMControl\src\KinectV2MouseControl\bin\Release\Images\lamp1.bmp") };
        frm.Cursor = new Cursor(((Bitmap)pb.Image).GetHicon());
        frm.WindowState = FormWindowState.Maximized;
        frm.TransparencyKey = frm.BackColor = System.Drawing.Color.Turquoise;
        frm.FormBorderStyle = FormBorderStyle.None;
        frm.ShowDialog();

}


What I have tried:

I already try to add image in form, but I want add image to mouse cursor.
Posted

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900