Let's say I have a cursor named myCur.cur. What I would like to do is use that cursor on my desktop application instead of the boring cursor provided by Visual Studio 2005. How do I write for that?
+2
A:
If you're targeting WinForms, load a cursor file (the one with the ".cur" extension) that you created
Cursor myCursor = new Cursor("myCursor.cur");
then assign it as the cursor on any of your controls:
myControl.Cursor = myCursor;
For additional information on how to do more than this, and create your cursor programmatically instead of loading it from a file, then check out this tutorial.
Should you be or become interested in how to do this in WPF, there's also an article to this regard.
luvieere
2010-06-29 05:20:31