WebBrowser is a browser control of IE built-in without user downloads. The discussion of this document is the technical content about the IE6.0 version of WebBrowser control. Other versions of IE should also support it. The technical requirements associated with it are: the generation of print documents, page settings, and implementation of print operations. This article is as an example, but he can easily transplant into other Web technology. I. WebBrowser control
Second, WEBBROWDER control method // Print WebBrowser1.execwb (6, 1); // Print Set WebBrowser1.execwb (8, 1); // Print Preview WebBrowser1.execwb (7, 1); Third, implement print settings , Print data, print preview, and printing. Implement printing settings, print data generation, print preview, and print I generally do this, if the query result is in A.ASP, then place print settings in A.ASP, print preview, print three buttons. Click the Print Setting button to perform webbrowser1.execwb (8, 1) in JS to open the print settings window. Click the Print Preview button to open a B.asp, regenerate print data in B.ASP, then automatically perform WebBrowser1.exeCWB (7, 1) in B.ASP to open the user preview interface. Click the print button or open B.ASP, regenerate the print data in B.ASP, then automatically perform WebBrowser1.execwb (6, 1) in B.ASP to automatically print data. Fourth, the code A.ASP calls data is not given. Just give the code for several buttons: