Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing from the webbrowser control
Message
From
25/11/2010 12:24:26
 
 
To
19/11/2010 19:10:01
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
01489859
Message ID:
01490495
Views:
42
>I'm trying to print from the webbrowser control that is hosted in a VFP9 form. I'd found that I can issue the following command to print the content that is rendered in the control:
>
>THISFORM.oWb.execWB(7, 0)
>
>where oWb is the webbrowser control.
>
>Well it *almost* works. Here's my issue - if I generate all my content into a local html file and I navigate to it then print it using the command above, all is ok. If, however, I first navigate to a "shell" html file that contains several empty divs into which I then "inject" content, it does not print anything although the content looks fine on my screen!
>
>My question is, does the webbrowser control need to have all content in the physical html file before it can print it? As I said, the page looks fine on my computer screen (with content injected into the divs that are the only "real" items in the html file). It just doesn't print the content. If I were to write out the body's innerhtml to a local html file prior to calling the print command, it's seem to work ok. I was hoping to avoid this last step though.
Hi
#DEFINE OLECMDID_PRINT 6
#DEFINE OLECMDEXECOPT_PROMPTUSER 1
#DEFINE OLECMDEXECOPT_DONTPROMPTUSER 2
ThisForm.webbrowser1.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
HTH
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform