VB6 Drag image from web browser to image or picture box?

Posted on 2006-04-11
Last Modified: 2012-06-21
I have webbrowser in my vb6 application, I have it load a website with images on it... I can drag and drop the images to a RitchTextBox on the form but not to a imagebox or picterbox.

What are the property settings or what code needs to be in place to allow the image drag and drop from web to picture box or image box? (VB6)

Question by:siweddle
    LVL 28

    Accepted Solution

    Try setting the Pictureboxes OleDropMode Property to manual,then try:

    Private Sub Picture1_OLEDragDrop(Data As DataObject, Effect As Long, _
    Button As Integer, Shift As Integer, X As Single, Y As Single)
        On Error GoTo Err
        Picture1.Picture = LoadPicture(Data.Files(1))
        Exit Sub
        MsgBox "The Picture you dragged could not be loaded"
    End Sub

    Author Comment

    Thanks vinnyd79,
    it works now! woohoo.

    Thought I had set the "OleDropMode" but it was the  "DragMode" I set and that ofcorse did not work.. thanks for the tip.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    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…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    759 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

    11 Experts available now in Live!

    Get 1:1 Help Now