C# 发起拖放

一 发起拖放

从本窗口发起播放,传递数据给他人。
C# 发起拖放_第1张图片
拖放操作可以分解Wie:按下,拖动:
① MouseDown:记下初始位置;
② MouseMove:检查位移,当位移到达一定程序时,任务用户发起了拖拽操作。
this.DoDragDrop(data,effect)后续过程由系统托管。

二 拖放的结果

源窗口

DragDropEffects result
=this.DoDragDrop(transfer,DragDropEffects.All);
if(result==DragDropEffects.Move)
{}

你可能感兴趣的:(C#,c#,ui)