C# Creating a Custom Mouse Cursor
C# Creating a Custom Mouse CursorPosted in Programming at 7:17 am by Michael DanielThis is surprisingly easy to do. To create a cursor from an image resource:Cursor cursor = new Cursor(Propert
·
C# Creating a Custom Mouse Cursor
This is surprisingly easy to do. To create a cursor from an image resource:
Cursor cursor = new Cursor(Properties.Resources.add.GetHicon());
this.Cursor = cursor;
To create a cursor from any graphic:
Bitmap bmp = new Bitmap(55, 25);
Graphics g = Graphics.FromImage(bmp);
g.DrawString(“Hello World!”, this.Font, Brushes.Blue, 0, 0);
Cursor cursor = new Cursor(bmp.GetHicon());
this.Cursor = cursor;
更多推荐




所有评论(0)