private void DirectXViewer_DragDrop(object sender, DragEventArgs e) { mousePressedFlag = false; if(e.Data.GetDataPresent(typeof(Bitmap))) { Object obj = e.Data.GetData(typeof(Bitmap)); { try { Bitmap image = (Bitmap)((Bitmap)obj).Clone(); RenderImage = image; image.Dispose(); } catch(Exception ex) { MessageBox.Show(ex.Message.ToString()); } } } }
private void DirectXViewer_MouseMove(object sender, MouseEventArgs e) { if (mousePressedFlag) { if(cacheBitmap != null) this.DoDragDrop(new Bitmap(cacheBitmap), DragDropEffects.Copy); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)