Drag and drop file to list view in Vista

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wrote a c# winforms application in .NET 1.1 which uses DragDrop
functionality to allow a user to drag a file to a list view. It works fine
in Windows XP, but in Windows Vista I get the "No drop" symbol. This holds
true even when right clicking the application shortcut and choosing to run as
Administrator. Any ideas what's preventing it from working in Windows Vista?
 
Seems OK for me on Vista...

Private Sub lvCustom_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles lvSave.DragEnter

e.Effect = DragDropEffects.Copy



End Sub
 
The resolution required two changes:

Update the manifest to remove the section indicating that it requires
administrator access.

Update the app.config to include the supportedRuntimes attribute.

It was crashing with .net 1.1 except when run as administrator, so I had
updated the manifest to run as administrator. However, the app will run with
..net 2, so I had to update the app.config to indicate that it supports 2.0 in
order for it to choose .net 2.0 at startup instead of 1.1. As soon as it
could start without elevated priviliges, the drag and drop started working as
well.
 
Back
Top