protected void WriteCursorToFile(Cursor cursor, string fileName)
{
byte[] blob = TypeDescriptor.GetConverter(typeof(System.Windows.Forms.Cursor)).ConvertTo(cursor, typeof(byte[])) as byte[];
if(blob != null)
{
FileStream fileStream = new FileStream(fileName, FileMode.Create);
fileStream.Write(blob, 0, blob.Length);
fileStream.Flush();
fileStream.Close();
}
else
MessageBox.Show('Unable to convert Cursor to byte[]');
}
Share with