Grab .jpg files
Grab .jpg files
Grab .jpg files
Grab .jpg files
Grab .jpg files
Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files
Grab .jpg files Grab .jpg files
Grab .jpg files
Go Back  Xtreme Visual Basic Talk > > > Grab .jpg files


Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2004, 10:23 AM
2bNvUs's Avatar
2bNvUs 2bNvUs is offline
Centurion
 
Join Date: Apr 2003
Location: Birmingham, AL
Posts: 165
Default Grab .jpg files


Hi. I have tried using various controls to accomplish this, but seem to keep running into a brick wall. What I am trying to do, is copy and save .jpg files from the internet onto my machine. Let's say I wanted Google's logo, i would request the url "http://www.google.com/images/logo.jpg", or something like that. Then put it in a specified folder. I can grab whole pages, and using the web browser control, grabbed some images, but how do I take the image and then save it to my harddrive?

thanx,
2bNvUs
__________________
I was just checkin' the...uh...specs on the..uh.. inline rotary..gu...I'm retarded. [I]-Chris Farley-Tommy Boy
Reply With Quote
  #2  
Old 02-23-2004, 11:56 AM
Aspen2K's Avatar
Aspen2KGrab .jpg files Aspen2K is offline
Contributor

Retired Leader
* Expert *
 
Join Date: Jan 2001
Location: Ohio
Posts: 717
Default

Use the iNet control

Might want to check out This thread

Aspen2K
__________________
A man is a success if he gets up in the morning and gets to bed at night,
and in between does what he wants to do. - Bob Dylan

Vb code does not go through spell check very well - Me
Reply With Quote
  #3  
Old 02-23-2004, 04:37 PM
jmill jmill is offline
Centurion
 
Join Date: Feb 2004
Posts: 149
Default

Quote:
Originally Posted by 2bNvUs
Hi. I have tried using various controls to accomplish this, but seem to keep running into a brick wall. What I am trying to do, is copy and save .jpg files from the internet onto my machine. Let's say I wanted Google's logo, i would request the url "http://www.google.com/images/logo.jpg", or something like that. Then put it in a specified folder. I can grab whole pages, and using the web browser control, grabbed some images, but how do I take the image and then save it to my harddrive?

thanx,
2bNvUs




Here's what i used to download radar pics, same concept.

Option Explicit
Dim rad1 As String, rad2 As String, rad3 As String, rad4 As String, rad5 As String, radloop As String, counter As Integer
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

Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function

Private Sub Form_Load()

DownloadFile "http://www.erh.noaa.gov/radar/images/DS.p19r0/SI.kiln/latest.gif", "c:\desktop\radar1.jpg"
Picture1.Picture = LoadPicture("c:\desktop\radar1.jpg")
rad1 = Picture1.Picture




End Sub
Reply With Quote
  #4  
Old 05-30-2004, 07:43 PM
Vertical Vertical is offline
Freshman
 
Join Date: May 2004
Posts: 28
Default I cant get this to work... :(

I am trying to do the same thing you are I think jmill, Im trying to download radar images from weather.com (warnings) and my local news website (long range radar and short range radar) I have a tabstrip on a form, labeled Watches/Warnings, Long Range Radar, Short Range radar. I have a Picturebox on each tab at the appropriate size of the image it will load. The only problem im having is getting any image to load. Its extremely simple to load one from my hard-drive but that of course doesn't help because you dont get the live updates. I want the program to be able to refresh the image (Or re-download it to be used in the program) once every 2 minutes automatically whichever tab im viewing. This seemed like it would be very simple when I started it, but I can't get ANY image off the internet no matter what I do I have looked thru countless posts on these forums, and tested and tryed the code snippets, and I can't seem to get anything to work. Any help any of you could give would be greatly appreciated. Thanks <3
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Creating Resource Files in Visual Basic Glade Tech Discussions 1 12-07-2007 01:52 AM
Making Backups of files soundspawn File I/O and Registry 1 12-08-2003 09:51 PM
Required files burningodzilla General 11 09-12-2001 04:51 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Grab .jpg files
Grab .jpg files
Grab .jpg files Grab .jpg files
Grab .jpg files
Grab .jpg files
Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files Grab .jpg files
Grab .jpg files
Grab .jpg files
 
Grab .jpg files
Grab .jpg files
 
-->