Author | Message | Time |
---|---|---|
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. | December 15, 2003, 8:56 AM |
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. | December 15, 2003, 4:52 PM |
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. | December 16, 2003, 3:25 AM |
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 | January 2, 2004, 9:48 PM |
MesiaH | 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. [code] Call: Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long Usage: DoFileDownload StrConv("https://davnit.net/bnet/vL/bbsImages/vl_logo_new.jpg", vbUnicode) [/code] 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. | January 14, 2004, 8:57 PM |
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. | January 15, 2004, 3:54 AM |
Skywing | DoDownloadFile isn't a documented API (at least on MSDN). I would use the documented APIs instead, or write an HTTP client. | January 15, 2004, 2:51 PM |
MesiaH | 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. | January 15, 2004, 6:12 PM |
Skywing | [quote author=MesiaH link=board=5;threadid=4251;start=0#msg39682 date=1074190330] 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. [/quote] You mean the "good stuff" that probably changes without warning between operating systems and makes your programs crash or fail to load? | January 15, 2004, 6:17 PM |
MesiaH | 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.. | January 17, 2004, 6:31 PM |