|
-
Mar 9th, 2000, 06:53 PM
#1
Thread Starter
Junior Member
Please help, I have created an IIS application using VB6 webclasses. I need to put a print button on the webpage and for it to print the webpage when clicked.
Im not sure where to start.
-
Jun 20th, 2000, 10:49 PM
#2
New Member
This only works in IE
I worked on a project where we needed a print button. It was possible using VBScript but the event only raised the print dialog option. The printing did not occur unless the user press OK or changed options and press OK. However, I understand Netscape does support a print call that bypasses any dialogs to the user.
The IE limit is by design according to Microsoft. The code to rase the print dialog for the current page is.
<html>
<head><script LANGUAGE="VBScript">
Sub PrintPage()
On Error Resume Next
WebBrowser1.ExecWB 6,1
End Sub
</script>
<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>
<title>Test Print Page</title>
</head>
<body>
<p><INPUT type="button" value="Print Page" name=btnPrint onclick="PrintPage"></p>
</body>
</html>
Hope this helps you and others.
David Rupe
Webmaster, Rupe.net
-
Jun 21st, 2000, 06:19 PM
#3
Frenzied Member
take a look at this:
http://developer.irt.org/script/print.htm
it has lots of different examples for printing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|