我正在寻找一种方法,在 DragDrop 事件发生后确定在 toolStrip 中拖动的是哪个项目,我想做的就是使用不同的 case 语句为 toolstrip 中的每个项目编写不同的情况,但似乎找不到比较它们的方法。
更新:简短的代码示例
private void toolStrip1_DragDrop(object sender, DragEventArgs e)
{
//Here I want something like a DoDragDrop() and send the specific item from the
//toolstrip..
}
private void panel1_MouseUp(object sender, MouseEventArgs e)
{
//And here some way to determine which of the items was dragged
//(I'm not completely sure if I need a mouseUp event though..)
}
希望更容易理解我正在尝试做的事情。