LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 370 users online 225693 members 280 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
note to self
Interests: Music, singing dancing
Mood: Happy
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
1 online / 77 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Quoting Post
Archived Topic: It will not be bumped to the top of the forum.
Topic VB6 - URL as Image box location
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
masterfultemptation Posted at 5:08 pm on June 1, 2006
Okay so I a URL of an image...but when I set the image box's location to the URL, it says type mismatch.
This is the code now:

ArtistImage.Picture = "http://home.cogeco.ca/~nickj/new.gif"

Is there a way to get the image from that URL into the image box without using a Winsock control to download it?

Replies
masterfultemptation Posted at 6:48 am on June 2, 2006
yeah, i was thinking about that...but i dont want the scroll boxes and am too lazy to find a way to get rid of them.  actually, i tried this and it seems to work:

Code:

Dim Array1() As Byte, FileNumber As Long, TempFile As String
TempFile = App.Path & "temp.jpg"
Array1() = Inet1.OpenURL(ImageURL, icByteArray)
FileNumber = FreeFile
Open PicFile For Binary Access Write As #FileNumber
Put #FileNumber, , Array1()
Close #FileNumber
imgArtist.Picture = LoadPicture(PicFile)
Kill PicFile

telomere13 Posted at 6:31 pm on June 1, 2006
I don't know of a way offhand using an image box, but perhaps you can cheat by using a webbrowser control and directing it to that URL.
All 2 previous replies displayed.