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. C#
  4. Capturing the filename

Capturing the filename

Scheduled Pinned Locked Moved C#
question
5 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.
  • C Offline
    C Offline
    chandler83
    wrote on last edited by
    #1

    I have a list view control. Say, if i drag a word document from windows and drop it on the list view control. can i get the file name with path. Is is possible to get the details? By what way i can acheive it?? thanks in advance..

    A 1 Reply Last reply
    0
    • C chandler83

      I have a list view control. Say, if i drag a word document from windows and drop it on the list view control. can i get the file name with path. Is is possible to get the details? By what way i can acheive it?? thanks in advance..

      A Offline
      A Offline
      AB7771
      wrote on last edited by
      #2

      Yes off-course. Handle the drag-drop event of the dropdown and use the following code if (e.Data.GetDataPresent(DataFormats.FileDrop)) { file = (string[])e.Data.GetData(DataFormats.FileDrop); } file is a string array that will be filled with the filenames with their paths. Regards,

      Everyone is a genius at least once a year - Pramod

      C 1 Reply Last reply
      0
      • A AB7771

        Yes off-course. Handle the drag-drop event of the dropdown and use the following code if (e.Data.GetDataPresent(DataFormats.FileDrop)) { file = (string[])e.Data.GetData(DataFormats.FileDrop); } file is a string array that will be filled with the filenames with their paths. Regards,

        Everyone is a genius at least once a year - Pramod

        C Offline
        C Offline
        chandler83
        wrote on last edited by
        #3

        thank you pramod. I am still facing some problems.... i enabled the allow drop property of that list view control. and when i drag an item from the desktop to that control nothing is happening. tht particular event is not firing... any idea what i have to do next.... plzz thanks again...:((

        A 1 Reply Last reply
        0
        • C chandler83

          thank you pramod. I am still facing some problems.... i enabled the allow drop property of that list view control. and when i drag an item from the desktop to that control nothing is happening. tht particular event is not firing... any idea what i have to do next.... plzz thanks again...:((

          A Offline
          A Offline
          AB7771
          wrote on last edited by
          #4

          one thing u need to do is handle the drag-enter event and write the following line e.Effect = DragDropEffects.Copy; Regards,

          Everyone is a genius at least once a year - Pramod

          C 1 Reply Last reply
          0
          • A AB7771

            one thing u need to do is handle the drag-enter event and write the following line e.Effect = DragDropEffects.Copy; Regards,

            Everyone is a genius at least once a year - Pramod

            C Offline
            C Offline
            chandler83
            wrote on last edited by
            #5

            thank u.... its perfect......... thank u.... on the track again.......:laugh::):rose:

            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