this.listBoxControl2.AllowDrop = true;//获取或设置一个值,该值指示控件是否可以接受用户拖放到它上面的数据。
//源ListBoxControl
private void listBoxControl1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
if ((p != Point.Empty) && ((Math.Abs(e.X - p.X) > SystemInformation.DragSize.Width) || (Math.Abs(e.Y - p.Y) > SystemInformation.DragSize.Height)))
{
DataRowView row = listBoxControl1.SelectedItem as DataRowView;
List<DataRow> rows = new List<DataRow>();
rows.Add(row.Row);
&nb