winform 设置鼠标样式 我设置成一张图片了但是 最好不要把原本的那个箭头隐藏。求大神
public void SetCursor(Bitmap cursor, Point hotPoint)
{
int hotX = hotPoint.X;
int hotY = hotPoint.Y;
Bitmap myNewCursor = new Bitmap(cursor.Width *2 - hotX, cursor.Height*2 - hotY);
Graphics g = Graphics.FromImage(myNewCursor);
g.Clear(Color.FromArgb(0, 0, 0, 0));
g.DrawImage(cursor, cursor.Width - hotX, cursor.Height - hotY, cursor.Width,
cursor.Height);
this.Cursor = new Cursor(myNewCursor.GetHicon());
g.Dispose();
myNewCursor.Dispose();
}
--------------------编程问答--------------------
自己把箭头也画下去!!!
--------------------编程问答--------------------
你图片上带一个箭头不行么?
--------------------编程问答--------------------