Muallim-i Ali Posted June 25, 2007 Share Posted June 25, 2007 Dersi Hazırlayan : Programmar'a teşekkürler. Sürükle Bırak Örneği (C#) C# da Sürükle Bırak işleminin nasıl yapıldığını göreceğiz. Videoda anlatmıştım. Burdada Kodları veriyorum. 2 Listbox koyup propertiesten AllowDrop özelliklerini True yapacağız ve kodlar aşağıda sizlerle... public partial class Form1 : Form { int index; public Form1( ) { InitializeComponent( ); } private void listBox1_MouseDown(object sender, MouseEventArgs e ) { Point p = new Point(e.X, e.Y ); index = listBox1.IndexFromPoint(p ); if (e.Button == MouseButtons.Left ) { listBox1.DoDragDrop(listBox1.Items[index].ToString( ), DragDropEffects.All ); } } private void listBox2_DragOver(object sender, DragEventArgs e ) { if (e.KeyState == 1 ) { e.Effect = DragDropEffects.Move; } } private void listBox2_DragDrop(object sender, DragEventArgs e ) { listBox2.Items.Add(e.Data.GetData(DataFormats.Text ).ToString( ) ); listBox1.Items.Remove(listBox1.Items[index].ToString( ) ); } }[/CODE]Dersin videosu : http://www.kariyervideo.com/VideoAciklama.asp?id=137 Link to comment Share on other sites More sharing options...
kosbis Posted June 25, 2007 Share Posted June 25, 2007 bu c# konusu ıcın cok tesekkurler bana bunla ilgili dijital saat lazım port kontrollu ilginiz icin cok tesekkurler Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.