Results 1 to 3 of 3

Thread: Drag and Drop image from chrome

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    441

    Drag and Drop image from chrome

    hello,you know what is the way to get the image dragged and dropped from a browser (chrome) and get the image?, if we do this on the explorer this creates a file, although I can get the url of the image, this does not seem to be utility as this may also not be an image url but a link
    on the other hand vbCFFiles, vbCFDIB and vbCFBitmap are not present there are many formats but I do not know which would be the correct one, two of them give me error when recovering them

    Code:
    Option Explicit
    
    Private Sub Form_Load()
        Me.OLEDropMode = 1
    End Sub
    
    Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
          On Error Resume Next
          Dim i As Long
          With Data
            For i = -20000 To 20000
                If .GetFormat(i) Then
                    Debug.Print i, Left(StrConv(.GetData(i), vbUnicode), 10)
                    If Err.Number Then
                        Debug.Print "Error Data", i
                        Err.Clear
                    End If
                End If
            Next
          End With
    End Sub
    print result
    Code:
    'Error Data - 16264
    '-16195            €
    '-16191        Version:0.
    '-16186        http://lea
    ''Error Data - 16184
    '-16179        h t t p :
    '-16176        ÿÿÿÿ
    '-16094        X  P   G
    '-16001
    '-15782        h t t p :
    '-15774        <img id="s
    '-15773
    '-15768
    '-15767        ¶
    ' 1            h t t p :  <----vbCFText
    ' 13           h t t p :
    see if any data throws the head of a jpg ÿØÿà but nothing similar

    (In Windows 10, you should run Chrome as an administrator so you can drag and drop over vb6 IDE)
    Last edited by LeandroA; Dec 1st, 2019 at 11:15 PM.
    leandroascierto.com Visual Basic 6 projects

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