?
Solved

jpg from url

Posted on 2003-02-24
8
Medium Priority
?
206 Views
Last Modified: 2010-05-18
Hello vb coders,
I am trying to make some code that can show me a jpg picture from an url.

The thing is, I am trying to store data from a camera connected to the LAN. The camara is connected through a video server. A web page updates pictures every second and I would like to store these pictures to the HD.

I saw an example on MSDN with pictureFromUrl, but this does not work as I would like it to work. The example requires to make an OCX. Is it possible to do this without making an OCX? Secondly, the example does not update at all. It only gives me the first picture that the camara sent.

Please help

best regards
ismohamed
0
Comment
Question by:ismohamed
[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
8 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 8009507
You can use the URLDownloadToFile API to save the image to disk, and then use LoadPicture to show it in a PictureBox, e.g.,


Private Declare Function URLDownloadToFile Lib "urlmon" _
   Alias "URLDownloadToFileA" _
  (ByVal pCaller As Long, _
   ByVal szURL As String, _
   ByVal szFileName As String, _
   ByVal dwReserved As Long, _
   ByVal lpfnCB As Long) As Long




Function DownloadAndDisplayImage(ByVal URL As String)
    Call URLDownloadToFile(0&, URL, App.Path & "\temp.jpg", 0&, 0&)
    Picture1.Picture = LoadPicture(App.Path & "\temp.jpg")
End Function
0
 

Author Comment

by:ismohamed
ID: 8015279
Hi Azrasound,

You are on the right track. It is something similar I am looking for.  But the given example works the same way as my own example! The thing is, I am trying to stream video data. The website contains a jpg that is updated every second. I only get the first jpg. If I go to my internet explorer and "refresh" the site, then I can download the next picture. I would like to be able to do this without me having to push the refresh button in internet explorer, since I am tring to stream video data. Maybe someone has some code that can help me in streaming video pictures??

best regards
ismohamed
0
 

Expert Comment

by:CleanupPing
ID: 8901201
ismohamed:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
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!

 
LVL 28

Expert Comment

by:AzraSound
ID: 8902253
Recommendation - PAQ - Refund points
0
 

Author Comment

by:ismohamed
ID: 8902717
refund
0
 

Author Comment

by:ismohamed
ID: 8902720
refund
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8972656
ismohamed, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9667932
PAQed, with points refunded (100)

Computer101
E-E Admin
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

771 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