• Welcome to Valhalla Legends Archive.
 

Inet Retrieval

Started by WiLD, December 15, 2003, 02:56 AM

Previous topic - Next topic

WiLD

I have spent some time trying to get this to work with no luck. I want to retrieve an image and display it in an aimagebox but i only want it downloaded temporarly, for that time only. This is so it doesnt take up so much space and doesnt ned uneeded images siince the picture will change weekly! If anyone has any information with regards how to do this post.
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Spht

You should find this useful:
http://www.geocities.com/nerpter77/tnar/

T'nar, created by Ickis which uses Inet to download an image file [and set it as background]. Very straight-forward and good coding to learn from.

WiLD

ok i had a quick look @ it and from what i saw its gonna be bit more then i wanted, i was also talking to a friend and there is a much simplier way which im going to go with unless someone elese can provide a different option. Thank you for your help Spht it was greatly appreciated.
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

R.a.B.B.i.T

open the image for input and save it 2 a file (same name...?) then load the image to the imagebox, and when ur done, use the DeleteFile API Call

Mesiah / haiseM

#4
To download the image on any windows 95+ computer, you may want to try using the shdocvw.dll, this will let the user save it where he or she wants, then simply have your program remember where the file was saved, and kill it. This will excuse the need for the msinet.ocx, but it also may not be what you desire. But here is a little sample.


Call:
Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long

Usage:
  DoFileDownload StrConv("http://forum.valhallalegends.com/bbsImages/vl_logo_new.jpg", vbUnicode)


Edit:

You can also create a socket, and mimic the protocol to retreive the image, store it in a cache, dynamic resource files, common dialog API, etc.. there are numerous ways.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Tuberload

First thing you have to do is figure out what exactly you want to happen.

Objective: Receive an image of the week from a server of some sort, and display it.

From their figure out what steps you have to take to accomplish this.

Step 1: Establish connection to iotw server.
Step 2: Request iotw.
Step 3: Receive iotw and save it to a variable, object, file, etc...
Step 4: Display the image.
Optional Step 5: If you saved the image to a file, delete it.

Now, find out how to do this in Visual Basic and you should be set.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Skywing

DoDownloadFile isn't a documented API (at least on MSDN).  I would use the documented APIs instead, or write an HTTP client.

Mesiah / haiseM

#7
Of course it isn't documented on msdn, all the good stuff is hidden!

I prefer http://www.mentalis.org/apilist/apilist.php

They also have an EXCELLENT API viewer.

Edit: btw, its DoFileDownload, not DoDownloadFile (perhaps thats why it wasn't on msdn, or maybe just a small typo..)

Edit 2: ok, it isn't on msdn, oh well.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Skywing

Quote from: MesiaH on January 15, 2004, 12:12 PM
Of course it isn't documented on msdn, all the good stuff is hidden!

I prefer http://www.mentalis.org/apilist/apilist.php

They also have an EXCELLENT API viewer.

Edit: btw, its DoFileDownload, not DoDownloadFile (perhaps thats why it wasn't on msdn, or maybe just a small typo..)

Edit 2: ok, it isn't on msdn, oh well.
You mean the "good stuff" that probably changes without warning between operating systems and makes your programs crash or fail to load?

Mesiah / haiseM

Well, that is a very good point, but in the case of this particular call, ever since internet explorer was released in windows 95, it has not changed..
]HighBrow Innovations
Coming soon...

AIM Online Status: