How do I create a Cursor object from a Bitmap object? [duplicate]
问题 This question already has answers here : How can i replace cursor with bitmap in winform (2 answers) Closed 6 years ago . Assuming I have an existing System.Drawing.Bitmap object, how do I create a System.Windows.Forms.Cursor object with the same pixel data as my Bitmap object? 回答1: This answer is taken from this question. It allows you to both create a Cursor from a Bitmap object and set its hotspot. public struct IconInfo { public bool fIcon; public int xHotspot; public int yHotspot; public