Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing a JPG file.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01073824
Message ID:
01073880
Vues:
59
This message has been marked as the solution to the initial question of the thread.
Rather exotic way -- using Internet Explorer
#DEFINE OLECMDID_PRINT 6
#DEFINE OLECMDID_PRINTPREVIEW 7
#DEFINE OLECMDEXECOPT_PROMPTUSER 1
#DEFINE OLECMDEXECOPT_DONTPROMPTUSER 2
DECLARE INTEGER SetForegroundWindow IN user32 INTEGER hWindow

LOCAL cSource, cHtml, cTargetFile
cSource = "C:\Documents and Settings\My Documents\My Pictures\03simo.jpg"

SET TEXTMERGE ON
TEXT TO cHtml NOSHOW
<HTML>
<BODY bgcolor=#ffffff>
<img src="<<m.cSource>>">
</BODY>
</HTML>
ENDTEXT
SET TEXTMERGE OFF

cTargetFile = FULLPATH("test.htm")
SET SAFETY OFF
= STRTOFILE(cHtml, m.cTargetFile)
SET SAFETY ON

LOCAL oIE As InternetExplorer.Application
oIE = CREATEOBJECT("InternetExplorer.Application")
WITH oIE
	.Navigate(cTargetFile)
	.Visible=.T.
	= SetForegroundWindow(.HWND)
	.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER)
ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform