Hi,
I am trying to use my PictureBox image as a Custom Cursor for Drag and Drop. From the documentation, it suggests that I set the cursor in the GiveFeedback routine. If I do that, then the Image flickers. Is there a different or more preferred method to do this?
I am trying to use my PictureBox image as a Custom Cursor for Drag and Drop. From the documentation, it suggests that I set the cursor in the GiveFeedback routine. If I do that, then the Image flickers. Is there a different or more preferred method to do this?
C#:
private void pbLessThanLg_MouseDown(object sender, MouseEventArgs e)
{
PictureBox pbSelected = (PictureBox)sender;
pbSelected.DoDragDrop(pbSelected.Image, DragDropEffects.Copy);
}
private void pbLessThanLg_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
PictureBox pbSelected = (PictureBox)sender;
Cursor.Current = BitmapToCursor((Bitmap)pbSelected.Image, 64, 64);
}