Front Office Football Central  

Go Back   Front Office Football Central > Archives > FOFC Archive
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 01-25-2004, 07:48 PM   #1
Draft Dodger
Coordinator
 
Join Date: Jan 2001
Location: Keene, NH
Programming Help

been trying to figure out something that should be relatively simple to do. Using VB (.Net), but this is a pretty basic program - if someone can show me how to do what I want to do in one of the C languages, I could probably muddle through the rest.

basically, I want to automate the process of saving an internet picture to my hard drive. I know how to open a picture from a path on my hard drive, but I can't make it work with an internet link...

for example:

Code:
pic1.image = Image.FromFile("path of the file")

if the path is a path to where the picture is on my hard drive (S:\Graphics), the program works fine. I want to change that to an internet path (http://www.google.com/images/logo.gif), but if I do so I get an error. I'm sure there's a relatively simple way to do this, but it's eluding me - and a search through some books and online stuff hasn't helped me. I'm assuming that the "FromFile" part of the code is wrong, but I can't find anything else that may be a suitable replacement.

thanks in advance if anyone's able to point me in the right direction...
__________________
Mile High Hockey

Draft Dodger is offline   Reply With Quote
Old 01-25-2004, 07:51 PM   #2
Chubby
Grizzled Veteran
 
Join Date: Oct 2000
Location: Syracuse, NY
seriously, right click and save file... it still only takes one hand to do that
Chubby is offline   Reply With Quote
Old 01-25-2004, 07:53 PM   #3
Draft Dodger
Coordinator
 
Join Date: Jan 2001
Location: Keene, NH
Quote:
Originally Posted by Chubby
seriously, right click and save file... it still only takes one hand to do that

it's a couple thousand files (to use for a new facepack set). making a simple program to automate that process will save me a TON of time.
__________________
Mile High Hockey
Draft Dodger is offline   Reply With Quote
Old 01-25-2004, 07:54 PM   #4
Chubby
Grizzled Veteran
 
Join Date: Oct 2000
Location: Syracuse, NY
Quote:
Originally Posted by Draft Dodger
it's a couple thousand files (to use for a new facepack set). making a simple program to automate that process will save me a TON of time.


hmm yes that would suck then.
Chubby is offline   Reply With Quote
Old 01-26-2004, 07:49 AM   #5
Fido
High School Varsity
 
Join Date: Aug 2002
Location: New Hampshire, USA
Do you know the names of all of the files you want to download or are you looking for a wildcard approach?

You are not able to do it the way you are trying because you are asking VB to automatically establish a connectin to the web server for you. This works fine ine IE because IE is a web client and makes the connection. VB doesn't have that capability so you can't do it directly.

If you know the names of the files you want to grab, then http://msdn.microsoft.com/library/de...loadtofile.asp is what you are looking for.

If you want wild cards, then its a bit more work. You'll need to gram the html pages, and parse through them for the IMG tags, then download those.
__________________
Author of FOF Reporter and TCY Helper.

Last edited by Fido : 01-26-2004 at 07:49 AM.
Fido is offline   Reply With Quote
Old 01-26-2004, 08:39 AM   #6
Draft Dodger
Coordinator
 
Join Date: Jan 2001
Location: Keene, NH
Quote:
Originally Posted by Fido
Do you know the names of all of the files you want to download or are you looking for a wildcard approach?

You are not able to do it the way you are trying because you are asking VB to automatically establish a connectin to the web server for you. This works fine ine IE because IE is a web client and makes the connection. VB doesn't have that capability so you can't do it directly.

If you know the names of the files you want to grab, then http://msdn.microsoft.com/library/de...loadtofile.asp is what you are looking for.

If you want wild cards, then its a bit more work. You'll need to gram the html pages, and parse through them for the IMG tags, then download those.

thankfully, I do know the file names. many thanks Dave - that should get me back on track.
__________________
Mile High Hockey
Draft Dodger is offline   Reply With Quote
Reply


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

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 05:13 AM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.