Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-02-18
4
Medium Priority
?
498 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

596 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