How To Do
How can I use a bitmap cursor with DXFReader.NET Component?
Use the following code:
openFileDialog1.Filter = "Image files (*.jpg, *.png, *.bmp)|*.jpg;*.png;*.bmp";
openFileDialog1.Filter +="| JPEG (*.jpg)|*.jpg|PNG (*.png)|*.png|BMP (*.bmp)|*.bmp"
openFileDialog1.FileName = "";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
Bitmap bitmap = new Bitmap(openFileDialog1.FileName);
bitmap.MakeTransparent(bitmap.GetPixel(0, 0));
Graphics g = Graphics.FromImage(bitmap);
IntPtr ptr = bitmap.GetHicon();
dxfReaderNETControl1.CustomCursor = CustomCursorType.None;
dxfReaderNETControl1.Cursor = new Cursor(ptr);
}