Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经让拖放工作正常了。我只需要知道有没有办法识别拖动的项目来自哪个列表框?
谢谢,
尝试使用这个,我不认为是最好的解决方案,但它应该工作
foreach (ListBox _LB in this.Controls.OfType<ListBox>()) { if(_LB.Items.Contains(listBox1.SelectedItem)) { MessageBox.Show(_LB.Name); } }