Solved

Viewiing web images

Posted on 2001-06-13
4
140 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 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

707 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