WHY DOESN'T WINDOWS TREEVIEW DragOver EVENT FIRE?!?!?!
Posted on 2011-02-18
I have a treeview in my windows form.
- AllowDrop and all associated events are wired up.
- It allows dragging/dropping of it's own tree nodes, as well as files from windows explorer.
- 75% of the time everything works fine.
Last year I noticed that on certain computers, dropping of files from windows explorer didn't work. I was never able to re-produce this on my development box though, so it went unfixed for a long time. Last week though, I noticed it happening (sometimes) on my dev box - so I've set breakpoints in the DragEnter and DragOver events in the treeview to see WHY it doesn't allow dropping of files. The strange thing is that what I've found is that these events simply don't fire? I can STILL drag/drop treenodes within the tree, but SOMETIMES (SPORADICALLY) it simply doesn't fire those events for files dragged from windows explorer.
One other piece of information is that I had noticed similar behavior in the past when dragging files from a different monitor. In those cases I could simply move the windows explorer window onto the same screen as my app and then it worked as expected. In this case, there is only one monitor in play though - so I don't think that's the cause here.
ANY suggestions greatly appreciated!