Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying a web image on a form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01437844
Message ID:
01437882
Vues:
40
By the way my FTP download code is as follows

sz_ftp = CREATEOBJECT('ftp_service')
IF sz_ftp.OpenInternet("colinnorthway", "*******", "northwayweb.com", "21")
? "--- Receiving File from FTP Server"
IF !sz_ftp.GetFtpFile("colinglobe.jpg", "colinglobe.jpg", .T.)
?sz_ftp.GetErrorCode(.T.)
else
? "--- OK with receipt"
ENDIF

Colin

>The Image control can be sub-classed to do that:
>
>LOCAL oForm As TForm
>oForm=CREATEOBJECT('TForm')
>oForm.Show(1)
>* end of main
>
>DEFINE CLASS TForm As Form
>
>	ADD OBJECT Image1 As WebImage WITH;
>	Left=10, Top=10
>
>PROCEDURE Init
>	THIS.Image1.Picture='http://www.news2news.com/vfp/images/w32logo1.gif'
>
>ENDDEFINE
>
>DEFINE CLASS WebImage As Image
>
>PROCEDURE Picture_ASSIGN(cUrl As String)
>	DECLARE INTEGER URLDownloadToCacheFile IN urlmon;
>		INTEGER lpUnkcaller, STRING szURL, STRING @szFileName,;
>		INTEGER dwBufLength, INTEGER dwReserved, INTEGER pBSC
>
>	LOCAL cCacheFile
>	cCacheFile=REPLICATE(CHR(0),260)
>
>	IF URLDownloadToCacheFile(0, m.cUrl,;
>		@cCacheFile, LEN(cCacheFile), 0,0) = 0
>		THIS.Picture=m.cCacheFile
>	ENDIF
>
>ENDDEFINE
>
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform