W
Wilfried Mestdagh
Hi,
I'm trying to create a custom cursor with following code:
Bitmap bmp = new Bitmap(@"c:\1.png");
Graphics g = Graphics.FromImage(bmp);
Cursor cursor = new Cursor(bmp.GetHicon());
this.Cursor = cursor;
But I get the exception: "A graphic object cannot be created with an
indexed pixel format." I drawed the thing in black/with using Paint. I'm
not sure I understand what the 'indexed pixel format' is, but something
to do with Paint or do I use wrong code ?
I'm trying to create a custom cursor with following code:
Bitmap bmp = new Bitmap(@"c:\1.png");
Graphics g = Graphics.FromImage(bmp);
Cursor cursor = new Cursor(bmp.GetHicon());
this.Cursor = cursor;
But I get the exception: "A graphic object cannot be created with an
indexed pixel format." I drawed the thing in black/with using Paint. I'm
not sure I understand what the 'indexed pixel format' is, but something
to do with Paint or do I use wrong code ?