WebBrowser is an IE built-in browser control that requires no user download. One, WebBrowser control <object id= ' WebBrowser ' width=0 height=0 classid= ' CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 ' > </object> Webbrowder Control method//Print
WEBBROWSER1.EXECWB (6,1);
Print settings
WEBBROWSER1.EXECWB (8,1);
Print Preview
WEBBROWSER1.EXECWB (7,1); There are other uses for this component, which are listed as follows: WEBBROWSER.EXECWB (WEB.EXECWB) turn off all IE windows now (2,1) and open a new window WEB.EXECWB (4,1) to save the page WEB.EXECWB ( 6,1) Print WEB.EXECWB (7,1) Print preview WEB.EXECWB (8,1) print page Setup WEB.EXECWB (10,1) view page Properties WEB.EXECWB (15,1) appears to be revoked, pending confirmation WEB.EXECWB (17,1) Select All WEB.EXECWB (22,1) Refresh WEB.EXECWB (45,1) Close the form silently but print will print the entire page, the page has something to print out, we sometimes just need to print a data table, then we will write a style: Hide the parts you don't want to print: style content: <style type= "Text/css" media=print>. Noprint{display:none} </style> then use the style to: <P cl ass= "Noprint" > Where to print </p> code as follows: <script language= "JavaScript" > Function Printsetup () {//print page Setup WB.EXECWB (8,1); } function PrintPreview () {//print page Preview
WB.EXECWB (7,1);
}
function PrintIt () {if (confirm) (' OK to print? ') {WB.EXECWB (6,6)}} </script>
<object classid= "CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=0></OBJECT> <input Type=button name=button_print value= "print" class= "noprint" onclick= "Javascript:printit ()" > <input type= Button name=button_setup value= "Print page Setup" class= "noprint" onclick= "Javascript:printsetup ();" > <input type=button name=button_show value= "Print Preview" class= "noprint" onclick= "Javascript:printpreview ();" >
JavaScript for print, print preview, print settings