Click here to Skip to main content
15,919,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have mypionter.cur and i would to change default shape of cursor on my panel
how can do that??

thanks foe help??
Posted

1 solution

Here a sample, I have the cursor as a bitmap in resource.

private Cursor HandClosed;

In Contstructor of my form:
C#
// Create custom cursors
          Bitmap test = Properties.Resources.HandClose;
          test.MakeTransparent(Color.Fuchsia);
          HandClosed = new Cursor(test.GetHicon());

And I use it on a panel, this line is in a mouse move event, because I change the cursor depending on its postion:

C#
panel4.Cursor = HandClosed;


Hopefully this helps.



Check this links too
http://www.unifycommunity.com/wiki/index.php?title=Custom_Mouse_Pointer[^]
http://www.switchonthecode.com/tutorials/csharp-tutorial-how-to-use-custom-cursors[^]
 
Share this answer
 
v2

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