0

I have an Indian flag cursor like sym66.cur and I used it in C# code. It is running but it is not getting in proper image. Instead, it is getting a black image. How can make the cursor display in the proper format?

This is my code:

private void New_Registration_Load(object sender, EventArgs e)
{
  this.Cursor = new Cursor(Application.StartupPath + "\\sym66.cur"); 
}
paul
  • 13,312
  • 23
  • 81
  • 144
  • You need to provide more details about your situation. Please make sure that you're attempting to load `sym66.cur` from a valid location (i.e. is `Application.StartupPath` really pointing to where you think it is?). Perhaps this can help you: http://stackoverflow.com/questions/2797084/using-custom-cursor-winforms – Freesnöw Jan 29 '14 at 06:25
  • Possibly the accepted answer here: http://stackoverflow.com/questions/4305800/using-custom-colored-cursors-in-a-c-sharp-windows-application – Brian Jan 29 '14 at 06:51

1 Answers1

0

Q: Do you see a black square instead of a cursor ... or is your color cursor displaying in black and white.

The WinForms "Cursor" only supports black and white, not color:

http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor%28v=vs.110%29.aspx

The Cursor class does not support animated cursors (.ani files) or cursors with colors other than black and white.

FoggyDay
  • 11,962
  • 4
  • 34
  • 48