What is drag and drop doing?

Posted on 2006-03-22
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,
Question by:rcherne1
    LVL 5

    Assisted Solution

    "_DragDrop" event is fired in VB6
    LVL 2

    Accepted Solution

    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 ....)

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now