iki farklı Listboxtan Drap Drop sayesinde veri taşıyacaz.
Kullanılan : 2 Adet listbox1,listbox2
ilk başta listboxlar seçilirken sağda properties = AllowDrop true yapalım
listBox1 MounseDrop aktif edelim
point sec=new point(e.X,e.Y);
int siralalist1=ListBox1.IndexFormPoint(sec);
if(e.Button==MouseButtons.Left)//farenin tıklayıcı yönü seçiyoruz
{
listbox1.DoDragDrog(listbox1.Items[siralalist1],DrapDropEffects.ALL);
}
Listbox2 Drop_Over aktif edelim
if ( e.KeyState==1)
{
E.Effect=DrapDropEffects.Move;
}
listbox2 Drap_Drop aktif edelim
listBox2.Items.Add(e.Data.GetData(DataFormats.StringFormat).ToString());
Csharp Drap-Drop Sürükle Bırak
Kullanılan : 2 Adet listbox1,listbox2
ilk başta listboxlar seçilirken sağda properties = AllowDrop true yapalım
listBox1 MounseDrop aktif edelim
point sec=new point(e.X,e.Y);
int siralalist1=ListBox1.IndexFormPoint(sec);
if(e.Button==MouseButtons.Left)//farenin tıklayıcı yönü seçiyoruz
{
listbox1.DoDragDrog(listbox1.Items[siralalist1],DrapDropEffects.ALL);
}
Listbox2 Drop_Over aktif edelim
if ( e.KeyState==1)
{
E.Effect=DrapDropEffects.Move;
}
listbox2 Drap_Drop aktif edelim
listBox2.Items.Add(e.Data.GetData(DataFormats.StringFormat).ToString());
Csharp Drap-Drop Sürükle Bırak
Yorum Gönder