Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2007

Tip: Looking for answers? Try searching our database.

Drag and drop file to list view in Vista

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Trevor - 22 Jan 2007 03:01 GMT
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?
Jared (Home) - 22 Jan 2007 08:14 GMT
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
Trevor - 23 Jan 2007 07:11 GMT
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.

> Seems OK for me on Vista...
>
[quoted text clipped - 4 lines]
>
> End Sub

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.