Results 1 to 6 of 6

Thread: Download a picture to an VB-application?

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    50

    Question

    I would like to download a picture (.gif )from the net to my app. The reason is that the app needs to use different pictures for every day. I guess that could be done with the Inet-object, but how?

    Suggestions?

  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Code:
    Dim iFile As Integer
    Dim bBIN() As Byte
    bBIN = Inet1.OpenURL("www.mysite.com/images/image1.gif", icByteArray)
    iFile = FreeFile
    Open "C:\image1.gif" For Binary Access Write As iFile
       Put #iFile, , bBIN
    Close iFile
    'load the picture
    Picture1.Picture = LoadPicture("C:\image1.gif")
    You can modify it to suite your needs.

    Gl,
    D!m
    Dim

  3. #3
    Lively Member
    Join Date
    Aug 2000
    Location
    Dullawhere
    Posts
    100

    Exclamation

    just put a combo box hidden somewhere in the program and put the URL in it.

    Private Sub Form_Load
    WebBrowser1.Navigate Combo1.Text
    End
    I am stupid..but I AM 15 !
    *a line from a song i wrote*
    """"""""""""""""""""""""""""""""""""""""
    so i came to say life bites away
    whats done is done the past is gone
    i cant believe the sh*t I know
    i always wish it would just go
    """"""""""""""""""""""""""""""""""""""""
    "remember you Ps And Qs Boy !"

  4. #4
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Well if you don't NEED to download them...then you can use
    andymannewbie's idea...but instead of the webbrowser control use the picture box. Because when loading images into the webbrowser control you will be faced with getting rid of scroll bars and rezising. But if you need to have animated gifs going then i would recomend loading them into a gif control that you can get...here...


    Gl,
    D!m
    Dim

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    50
    The thing is that I do save the image in a file at the moment. I would like to skip that part and load the image directly into the app. Well, I'll try the browser-idea.

    Thanks for the answers!

  6. #6
    Guest

    Thumbs down

    Guys I need your help with the same thing.

    I load my picture with the webbrowser control as shown:

    WebBrowser1.Navigate ("www.anysite.com/images/logo.gif")

    the picture is displayed fine in my form but How can I save the picture in my c:\ drive ?

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