Drag and Drop not working in FlowLayoutPanel


I am trying to do a drag and drop into a FlowLayoutPanel component.  After setting up the AllowDrop to true, it gets to DragEnter event, I changed the e.Effect = All.   Now in DragOver (not sure why the DragDrop Event is not fired) I read the e.Data like this:

Dim files = e.Data.GetData(DataFormats.FileDrop)

For Each file In files
Dim s = file

But I noticed that file = “application/pdf” instead of reading the full filename of my dropped PDF file.

Thank in advance.  Robert


  • You must to post comments

Hi Levie,

Here is my little example. The intension is to drop a PDF file to the flowlayoutpanel, after checking that it is a PDF, I want to copy it so the DragDrop event gets fires.

Thank you

Robert J

  • You must to post comments

Hi Robert,

I believe this is the intended behavior of DragEnter / DragOver, as you shouldn’t be able to see the user’s file until it’s actually dropped on the page for security reasons.

You might find this page helpful: https://html.spec.whatwg.org/multipage/dnd.html#security-risks-in-the-drag-and-drop-model

If you could please attach a small sample I can help you debug why the DragDrop event is not firing for you correctly!  It should fire when the user releases the mouse with the file on top of the control.

Let me know how I can help!

Best regards,


  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.