bho for ie6 tutorial in vb6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amyourpet
    New Member
    • Jan 2008
    • 3

    bho for ie6 tutorial in vb6

    i want to write a bho for ie6 using vb6 which can save a particular image,which when right clicked and select an option,in webpage to local harddisk.
    i serched a lot,but was nt able to see simple and step by step explaining tutorials,PLEAS E GUIDE ME
  • WinblowsME
    New Member
    • Jan 2008
    • 58

    #2
    Here's a start.



    [CODE=vb]Sub Main()
    Dim IE As Object, item As Variant
    Dim web_site As String, path_name As String, file_name As String

    web_site = "http://www.yahoo.com"
    path_name = "C:\Documen ts and Settings\Winblo wsME\Desktop\Te mp\"

    Set IE = CreateObject("I nternetExplorer .Application")

    With IE
    .Visible = True
    .Navigate web_site
    End With

    Call Wait(IE)

    For Each item In IE.Document.Ima ges
    file_name = Mid(item.src, InStrRev(item.s rc, "/") + 1)
    Call Copy_HTTP_File( item.src, path_name, file_name)
    Next

    IE.Quit
    Set IE = Nothing
    End Sub

    Private Sub Copy_HTTP_File( http_file As String, path_name As String, file_name As String)
    Dim win_http As Object, downloaded_byte s() As Byte

    Set win_http = CreateObject("W inHttp.WinHttpR equest.5.1")

    win_http.Open "GET", http_file, False
    win_http.Send

    Open path_name & file_name For Binary As #1
    downloaded_byte s() = win_http.Respon seBody
    Put #1, 1, downloaded_byte s()
    Close

    Set win_http = Nothing
    End Sub

    Private Sub Wait(IE As Object)
    While IE.Busy
    DoEvents
    Wend

    While IE.Document.Rea dyState <> "complete"
    DoEvents
    Wend
    End Sub
    [/CODE]

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      What is a bho?

      Anyway, isn't that save-image functionality already built into IE?

      Comment

      • kadghar
        Recognized Expert Top Contributor
        • Apr 2007
        • 1302

        #4
        Originally posted by Killer42
        What is a bho?

        Anyway, isn't that save-image functionality already built into IE?
        A browser helper object (those anoying things that get installed in the IE when you are sleepy and click an "accept" you shouldnt), DLLs like The Yahoo bar, now i've one of Dealio i dont know how it get there.

        Yes, they pretty much have funcionalities already built into IE, but they seem to be popular. And it seems interesting the way they work and how to make them. We can make TSDN tool bar!!

        I'll keep subscribed here

        Comment

        • amyourpet
          New Member
          • Jan 2008
          • 3

          #5
          Originally posted by kadghar
          A browser helper object (those anoying things that get installed in the IE when you are sleepy and click an "accept" you shouldnt), DLLs like The Yahoo bar, now i've one of Dealio i dont know how it get there.

          Yes, they pretty much have funcionalities already built into IE, but they seem to be popular. And it seems interesting the way they work and how to make them. We can make TSDN tool bar!!

          I'll keep subscribed here
          TSDN tool bar!!??
          sorry,what is it realy?

          Comment

          Working...