Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print HTML File from VFP ?
Message
 
 
To
14/11/2001 05:12:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00576547
Message ID:
00581585
Views:
71
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform