Solved

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

Posted on 2011-02-18
4
496 Views
Last Modified: 2013-12-17
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!
0
Comment
Question by:kalliopi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 34927408
One possible cause for this issue is UAC (User Account Control) issues on Vista (and above).  If the UAC is turned on in Vista it prevents some kind of drag/drop operations as a "security measure".  On Win 7 it can also occur if the default UAC has been turned to a stricter mode of operation.

What operating system is being used on the machines that exhibit this problem?  Is UAC turned on for any of them?  What level of user is logged in?  etc....

Here's a recent example:
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_26723582.html
http://foxsys.blogspot.com/2009/08/windows-7-user-account-control-uac-drag.html
0
 
LVL 6

Author Comment

by:kalliopi
ID: 34927851
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.
0
 
LVL 6

Author Comment

by:kalliopi
ID: 34980852
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.
0
 
LVL 6

Author Comment

by:kalliopi
ID: 35038140
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.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question