We help IT Professionals succeed at work.

What is drag and drop doing?

rcherne1 asked
Medium Priority
Last Modified: 2010-05-18
What is drag and drop doing?

I have a folder with shortcuts to all of my printers in it. It also contains .doc, .bmp, .txt and other printable documents. If I want to print one of the documents I can just drag and drop it onto one of the printer shortcuts. My question is what command is sent to the printer shortcut? I want to be able to do the same thing, but using VB code.

Thanks for your help,
Watch Question

"_DragDrop" event is fired in VB6

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
mah8473: ... if you have set the OLEDragMode property from "0" (none) to "1" (manual)

Example for accessing the 1. Markt File when dropping. Unfortunatly this doen´t work for droping a printer shortcut. Don´t know exactly waht´s your goal. Dropping .bmp should work.

Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)

Debug.Print Data.Files.Item(1)

End Sub

This will be the filename

(Too make sure the User drop one or more files: if Data.GetFormat(15) then ....)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.