Drag And Drop not working on vista
-
Thursday, June 07, 2007 6:58 AM
Hello,
I wrote a very basic wpf window to do some drag and drop of files and folders.
<Window x:Class="WindowsApplication3.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WindowsApplication3" Height="300" Width="300" AllowDrop="True" Drop="OnDrop"><
Grid></Grid></
Window>and the only function
public
void OnDrop(object sender, DragEventArgs e) {}This code is perfectly working under windows xp but when I use it under windows vista I can't drop any things on the window.
Does someone manage to get the drag and drop feature working on vista?
Is there something to add to get it work?
(The purpose is to drag and drop files and folders to the window)
Any input would be very welcome.
Thx
All Replies
-
Friday, June 08, 2007 6:09 AM
Hi,
I tried to get it work but i can't manage to do it.
I tried to change the drag effect during the drag over event but I don't even get the even to be fired.
The only thing I get is the forbiden icon when I move files and folders over the application window.
The code was perfectly working under windows XP and not at all under vista.
I don't have any clue about what's going wrong or what is requiered to get it work under windows vista.
If any one could help I would appreciate.
Thank you
-
Friday, June 08, 2007 7:50 AM
Hello,
I found a post (http://wundasworld.blogspot.com/2007/04/vista-drag-and-drop.html) that say's that
Application A will not accept "drags" from application B because Vista prevents lower security applications from giving data (and potentially hurting) higher level applications.
I m runing visual studio as administrator and the files comes from the explorer that is probably not runing as administrator.
Any one knows more about this issue?
-
Friday, June 08, 2007 12:29 PMI noticed this as well -- but didn't investigate thoroughly.
Try running your application outside of Visual Studio. Does the drag/drop work there? My experience shows that it does. I believe you can attach to the other process and debug it that way if necessary (I don't recall that needing elevated privileges).
Try running an Explorer instance (source for drag) as an Administrator -- does drag work when running debugging/from Visual Studio?
Third -- try not running VS as an admin in Vista. -
Monday, June 11, 2007 6:10 AM
I am facing the same issues mentioned above on Vista.
I have an application developed in C# that uses a listbox with drag and drop feature. when i run it with a non-admin privileges the drag and drop works fine. however when i run it with the admin privileges it just does not work.
I require that the application HAS to run with admin privileges as there are a couple of directories/files i need to create/modify and this sometimes fails in with the normal privileges.
Has anyone got drag and drop working with Admin Privileges on Vista?
if you have plz let me know how? plz mail me @ manish.goyal@in.v2solutions.com
thanks a lot in advance.
-
Monday, June 11, 2007 3:50 PMThere may be no workaround to this problem as this is a Vista issue, not WPF. Rather than running your application as administrator, is it possible to grant additional security to the directories and folders to the normal user rather than elevating privileges of the application?
If you drag from one admin window to another admin window, does that work?
The problem is that you're not allowed to drag from one application running with a normal user security token to another application running with an elevated security token. -
Wednesday, December 26, 2007 4:39 AM
There is Windows Policie which privent you to do such thing
When you run your application Under Admin privialge at that time your Programe have Highest priority, n Explorer have Midioum priority.
Whindos Define that Low Prioprity can not send messge to high prioprity.
If you force fully want to perfom this you may have to change messge priority when messge post to your application ..
-
Thursday, April 17, 2008 10:31 AM
Hi there folks
I run vista enterprise in a workgroup, and I have disabled UAC. I dont have any problems like this, I can drag 'n drop as much as I wan't to.
I will bet that if you're running vista in a domain, you have to set these rules (drag 'n drop) via group policies
in active directory, if you are not admin, ask him!
-
Tuesday, March 17, 2009 11:03 PMI'm working on Server 2008 for a Windows SharePoint Services application and I'm finding it almost impossible:
- Can't easily use the GAC
- Can't drag and drop into VS!
- "Allow", "Allow", "Allow"
So I created a shortcut to C:\Windows\Explorer.exe onto the desktop and then "Ran as Administrator" and guess what? It doesn't work. No drag and drop.
- Can't easily use the GAC
-
Wednesday, January 13, 2010 6:07 AMI'm having the same issue as described above.I'm working on a web application that is configured to use my local IIS for debugging so I must run Visual Studio as Administrator.However, this prevents me from debugging features of my program that involve dragging something from Windows Explorer and dropping them on my program. I've tried running Windows Explorer as Administrator but this hasn't fixed the problem.Any ideas, suggestions, or updates on this?Thank you.Zenkei Rich
-
Wednesday, September 14, 2011 6:55 AMthanku my dear friend..it solves my problem....again thanku very very much

