Results 1 to 3 of 3

Thread: Urgent, please help me about drag and drop. Thankx....

Hybrid View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2002
    Posts
    18

    Question Urgent, please help me about drag and drop. Thankx....

    Hi guys,

    I'm using VB.NET.

    I have a simple application. Just a form, and a ListView.

    I have a procedure in the form, it read's all the files in my specificed local drive, and show the files name, size and created day. It works perfectly.

    Now, I want add a drag and drop functionality in this application. For example, when I drag a file from my desktop, and drop it in the list box, it will do the following:

    - Add the file's name, size and date into the listview
    - Copy the file to my another specificed path

    My problem is simple, I don't know how to do it!

    Can anyone give me a sample code and let me figure it out, or give me some hints, advice or anything can help.

    Thanks in advance

    Andy

  2. #2
    New Member
    Join Date
    May 2002
    Location
    michigan
    Posts
    8
    I am looking for a drag and drop function also. I posted to another thread when I seen this one, all i want to do is drop a file onto a exe and have that file set as a varialbe. But I tried the above code and it wouldn't run correctly.

  3. #3
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    Which code did you try??

    If you drop a file onto an EXE that is NOT RUNNING, then:
    - The EXE will start to run.
    - The name of the file you dropped onto it will be available to the .EXE in the Command() parameter.

    If you drop a file onto an EXE that is already running, then you will need to decode the OLE Drag Drop routines, and find the name of the file that was dropped using the data structure.

    I suggest you get the first one working first - its easier to see, understand and test.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width