Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simulate Right Click "Save Image As"

Status
Not open for further replies.

Error7

Programmer
Jul 5, 2002
656
GB
I want to be able to save jpg images which are refreshed in the web browser every 30 seconds. The website gives access to saving the images by a right mouse click but I would like to do this in code if possible.

[gray]Experience is something you don't get until just after you need it.[/gray]
 
If you know the URL of the jpg file, you can use the URLDownloadToFile function to download the image directly, without rendering the web page in the browser.

See thread222-1150309
 
I suspect this post is closely linked to "Web Browser Inner Text" in which case there is no 'filename' involved.

Error7 I would suggest simply using BitBlt to capture the relevant area of the parent window since in your particular case it doesn't move and is always the same size.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Yes Andy, spot on. I can't download the image directly with that URL. I can download the image with a different URL that indirectly connects to the same site but the images only refresh every 4 minutes as opposed to every 30 seconds.

I did consider capturing the image but that means I can't have the form minimised.

Thanks anyway guys.

Alan

[gray]Experience is something you don't get until just after you need it.[/gray]
 
To further clarify, the first URL refreshes every 30 seconds but I can't download the image.


With this URL, I can download the image but it only refreshes every 4 minutes or so. Or at least it used to up until the 2nd August. Since then none of the images have updated at all.



[gray]Experience is something you don't get until just after you need it.[/gray]
 
Might I warn you that what you are attempting sounds a bit like image theft?
You know that mustn't simply download images from whatever website?

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Try placing the form off the edge of the screen, you should still be able to capture it.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
These images are available to the public from a Government website.
They can be saved to your HD by right clicking on them.
They are quite poor quality and not worth a bean to anybody.

I am not stealing them, I just want the ability to record them on the rare occasions when I need to so that I can review them at a later time.

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top