Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Drag and Drop from ...

Drag and Drop from ...

Scheduled Pinned Locked Moved Visual Basic
visual-studiohelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rspercy65
    wrote on last edited by
    #1

    I am trying to do a drag and drop from Windows Explorer to a listview box. I have tried a lot of stuff on MSDN and nothing seems to work. I am using VS 2008 Pro, OS is Vista and everything is up to date. Can someone Please point me in the right direction to something that does work. THNX in advance for the help.

    rspercy If "You wash your feet and find a pair of socks " Then "You ARE a Redneck" End If

    I 1 Reply Last reply
    0
    • R rspercy65

      I am trying to do a drag and drop from Windows Explorer to a listview box. I have tried a lot of stuff on MSDN and nothing seems to work. I am using VS 2008 Pro, OS is Vista and everything is up to date. Can someone Please point me in the right direction to something that does work. THNX in advance for the help.

      rspercy If "You wash your feet and find a pair of socks " Then "You ARE a Redneck" End If

      I Offline
      I Offline
      Ian Shlasko
      wrote on last edited by
      #2

      To receive data is actually pretty easy... 1) Set your listview's "AllowDrop" property to true, to let it receive data 2) In the DragEnter event... In there, you want to check the data being dragged to make sure it's what you want, and if so, set the AllowedEffects property of the DragEventArgs it gives you. This is to let windows know whether to allow the drop to occur. 3) In the DragDrop event... Read the data supplied in the DragEventArgs, and process it. The actual data being passed will be in a few different formats, so set a breakpoint and take a look at the formats to see how you want to receive it. Reference for WinForms: http://msdn.microsoft.com/en-us/library/za0zx9y0.aspx[^] (WPF is pretty much the same, if I remember right)

      Proud to have finally moved to the A-Ark. Which one are you in? Developer, Author (Guardians of Xen)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups