Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print HTML File from VFP ?
Message
 
 
À
14/11/2001 05:12:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00576547
Message ID:
00581585
Vues:
72
I'm not sure that documentcomplete is reliable. Try to wait for page download to finish and than print HTML
* Navigate to page
....
* Watt for page to load
DO WHILE ThisForm.oleWeb.readystate <> 4
 DOEVENTS()
ENDDO

ThisForm.oleWeb.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
BTW, there's a better way to wait for specified period of time. It doesn't use PC resources
Declare Sleep in WIn32api Integer nMilliseconds
Sleep(1000)  && wait 1 sec
>this work fine and great, I put the execwb print code inside documentcomplete event but it sometimes can't print out the html
>
>#DEFINE OLECMDID_PRINT 6
>#DEFINE OLECMDEXECOPT_PROMPTUSER 1
>#DEFINE OLECMDEXECOPT_DONTPROMPTUSER 2
>ThisForm.oleWeb.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
>inkey(4)
>thisform.release
>
>because, i want to load the html and print it out when it complete and quit the form
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform