drop and drag in winform is not really convenient comparing with wxPython.
As the target of drop, you must implement two functions to response two events separately:
1: dropenter
2: dragdrop
in the functions of responding dragdrop
you may write:
array<File^>^ fileList = static_cast<array<File^>^>(e->Data->GetData(DataFormats::FileDrop);
and then do what yo want to do to this file list.
本文比较了WinForms与wxPython中实现文件拖放功能的便捷性。在WinForms中,作为拖放目标的对象需要分别实现dropenter和dragdrop两个事件响应函数。在dragdrop事件处理函数中,可以通过静态转换获取到被拖放的文件列表。
1万+

被折叠的 条评论
为什么被折叠?



