问题
I'm using WinForms and have a DragDrop operation that handles a file being dragged onto the window. This works fine but if the path to the file is very long it just fails. string[] fileList = (string[]) e.Data.GetData(DataFormats.FileDrop, false);
results in fileList being null
.
Does anyone know what the limitation is or any way to work around it?
Thanks!
Update: The data in GetFormats is as follows:
Short Filename:
Shell IDList Array
UsingDefaultDragImage
DragImageBits
DragContext
DragSourceHelperFlags
InShellDragLoop
FileDrop
FileNameW
FileName
IsShowingLayered
DragWindow
IsComputingImage
DropDescription
DisableDragText
ComputedDragImage
IsShowingText
Long Filename:
Shell IDList Array
UntrustedDragDrop
UsingDefaultDragImage
DragImageBits
DragContext
DragSourceHelperFlags
InShellDragLoop
FileDrop
FileNameW
FileName
来源:https://stackoverflow.com/questions/44253187/winforms-dragdrop-path-length-limitation