Link to home
Start Free TrialLog in
Avatar of kalliopi
kalliopi

asked on

WHY DOESN'T WINDOWS TREEVIEW DragOver EVENT FIRE?!?!?!

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!
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalliopi
kalliopi

ASKER

I bet that's exactly what's going on.  Thanks.  I am now suddenly unable to re-produce the problem.  But as soon as I am able to verify this theory, I will award points for a correct answer.  Thanks.
I have been unable to reproduce this problem since it originally occurred, but I am about 90% certain that your suggestion about it being the UAC is probably right.  Thanks.
So - WAS Finally able to re-create the problem, and unfortunately, even though it seemed like a REALLY good explanation for the behavior, it does NOT appear to be related to the UAC.  Even when I run the app as Administrator, it still ignores my drag over events when the data comes from Windows Explorer.  STILL CONFUSED!!! I guess I'll have to re-post the question though - since points have already been awarded here.