在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
private void listBox1_MouseDown(object sender, MouseEventArgs e) { //调用DoDragDrop方法 if (this.listBox1.SelectedItem != null) { this.listBox1.DoDragDrop(this.listBox1.SelectedItem, DragDropEffects.Copy); } }
//设置treeview的AllowDrop属性(允许放置属性)为true this.treeView1.AllowDrop = true;
private void textBox1_DragEnter(object sender, DragEventArgs e) { //设置拖拽类型(这里是复制拖拽) e.Effect = DragDropEffects.Copy; } private void textBox1_DragDrop(object sender, DragEventArgs e) { //获取值 TableInfo item2 = (TableInfo)e.Data.GetData(typeof(TableInfo)); this.textBox1.AppendText("\n"); this.textBox1.AppendText(item2.TableName); // MessageBox.Show(item2.TableName); }
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论