?
Solved

Viewiing web images

Posted on 2001-06-13
4
Medium Priority
?
142 Views
Last Modified: 2010-05-02
I have an area in my application for viewing images (image1.)

I would like to be able to view the image of a specified web address...

i.e.

image1.picture = Load Picture(www.??????/target.jpg)

How do I set this up to use the address as the source for the pic and display it in my vb program?  Help.
0
Comment
Question by:perkster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
Ark earned 300 total points
ID: 6189410
Add Internet Transfer Control (Inet1)

Private Sub Command1_Click()
  Dim b() As Byte
  Dim sURL As String
  sURL = "http://www.experts-exchange.com/images/topleft.gif"
  Inet1.Protocol = icHTTP
  b = Inet1.OpenURL(sURL, icByteArray)
  Open "c:\temp.gif" For Binary As #1
  Put #1, , b
  Close #1
  Image1.Picture = LoadPicture("c:\temp.gif")
  Kill "c:\temp.gif"
End Sub

Cheers
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6189446
Use a webbrowser control to view it.

InVB,
Components... > Microsoft Internet Controls > OK.

Then, to load the pictur, add this line:

Webbrowser1.Navigate "www.??????/target.jpg"

That's it!

glass cookie : )
0
 

Author Comment

by:perkster
ID: 6192109
Ark,

  I am getting a runtime error on:

Inet1.Protocol = icHTTP

What component needs to be loaded to make this work?

Perkster
0
 
LVL 28

Expert Comment

by:Ark
ID: 6193541
VB menu -> Project -> Components -> Microsoft Internet transfer control (msinet.ocx)

Cheers
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 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