Torna al Thread

[CODE] private void FrmSchede_Load(object sender, EventArgs e) { FrmPalette frmPalette = new FrmPalette(); this.AddOwnedForm(frmPalette); frmPalette.Show(); pictureBox1.AllowDrop = true; } private void pictureBox1_DragDrop(object sender, DragEventArgs e) { Graphics g = pictureBox1.CreateGraphics(); g.DrawImage((Image)e.Data.GetData(DataFormats.Bitmap), new Point(e.X - this.Left, e.Y - this.Top)); } private void pictureBox1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.Bitmap)) { e.Effect = DragDropEffects.Copy; } else { e.Effect= DragDropEffects.None; } } [/CODE]
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5