0

I would like to use a custom embedded cursor, i tried this code, but i just see the normal cursor:

private void Form1_Load(object sender, EventArgs e)
{
  Cursor mycur = new Cursor(GetType(), "mycursor.cur");
  this.Cursor = mycur;
}

(the method is called from initalizecomponent) Why this isn't work, any other ideas? Thanks for any advice!

RaNdOmNaMe
  • 11
  • 5
  • Did you add that cursor as a resource? – nairdaen Apr 14 '13 at 10:23
  • Look in the Output window. Do you see a "First chance exception" message? Move this code to the constructor where it belongs. Also makes it debuggable on a 64-bit operating system. – Hans Passant Apr 14 '13 at 12:00

1 Answers1

0

Try this code: how-to-read-embedded-resource-text-file

and then put the stream instead of the file name string "mycursor.cur"

Community
  • 1
  • 1
Guy P
  • 1,395
  • 17
  • 33