Results 1 to 8 of 8

Thread: [RESOLVED] How to read source path from a cut and paste

Threaded View

  1. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How to read source path from a cut and paste

    I find that if I'm going to support copy/paste from Explorer then drag/drop belongs there too. While VB6 supports (ANSI) file drag/drop it needs help for copy/paste clipboard operations with files.

    I'm sure most of us have our pet routines for this kind of thing.


    I prefer to wrap similar API calls in a global predeclared object I call PasteFiles that provides a neat way to handle the issue with an object model more compatible with drag/drop in VB6. There is no need for those CopyMemory calls, I think somebody used a bad example to work from. This object has a separate method to test the clipboard for files so your program can avoid false hits by not displaying a right-click paste menu when there aren't any files in the clipboard to paste.

    This one handles Paste for Unicode file names as well.

    The attachment uses PasteFiles.cls in a stand-alone demo application. It uses a Unicode MessageBox call which helps illustrate Unicode support if you paste some Unicode filenames into it. Drag/drop is still ANSI however. But in reality this is almost never a problem for real applications and real users.
    Attached Files Attached Files

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