Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I download a Picture into a File
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00530186
Message ID:
00530380
Views:
15
local loNet, lcPath, laRet
* Byte array returned from net control
laRet = "" 
* local reference to inet on my form.
loNet = thisform.oNet 
* test image
lcPath = "http://www.levelextreme.com/thread/031414.jpg" 
* set access type
loNet.accesstype = 0 
* get byte array
laRet = loNet.openurl(lcPath, 1) 
lcImg = "" 
* Contcatenate all chars to string
for i = 1 to alen(laRet)
    lcImg = lcImg + chr(laRet[i])
endfor   
* write string out.
strtofile(lcImg, 'c:\dgs.jpg')
* this is an image i was populating.
thisform.oImg.picture = 'c:\dgs.jpg'


Hope this helps ya
Previous
Reply
Map
View

Click here to load this message in the networking platform