borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (run time error)Next Topic (Upside down ...) New Topic New Poll Post Reply
AndreaVB Forum : Printing : How can I print an active web page from VB form in which I used ActiveX Web Browser?
Poster Message
Blue Sky
Level: Guest


icon How can I print an active web page from VB form in which I used ActiveX Web Browser?

Hello All VB Specialist,
Plz help me. I've a problem. I want to print a web page from a vb from. I used webbrowser ActiveX and at run-time, I want to print active web page. I want to know how I must write the coding for that. I'll wait for your helpness.
Plz....................................      
                                                                with due respect,
                                                                       Blue  

15-07-2003 at 02:51 AM
| Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: How can I print an active web page from VB form in which I used ActiveX Web Browser?

For Page Setup:
WebBrowser1.ExecWB OLECMDID_PAGESETUP, OLECMDEXECOPT_PROMPTUSER

For Print:
WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER

For Print Preview:
WebBrowser1.ExecWB OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_PROMPTUSER

Steve

15-07-2003 at 10:14 AM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: How can I print an active web page from VB form in which I used ActiveX Web Browser?

Couple more options

For Copy:
WebBrowser1.ExecWB OLECMDID_COPY, OLECMDEXECOPT_PROMPTUSER

For Cut:
WebBrowser1.ExecWB OLECMDID_CUT, OLECMDEXECOPT_PROMPTUSER

For Save As...:
WebBrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER

For Page Setup:
WebBrowser1.ExecWB OLECMDID_PAGESETUP, OLECMDEXECOPT_PROMPTUSER

For Print:
WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER

For Print Preview:
WebBrowser1.ExecWB OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_PROMPTUSER

For Properties:
WebBrowser1.ExecWB OLECMDID_PROPERTIES, OLECMDEXECOPT_PROMPTUSER

If you want to go to Homepage:
On Error Resume Next
WebBrowser1.GoHome

If you want to appear a blank page:
WebBrowser1.Navigate "about:blank"

For a Quick Search:
WebBrowser1.GoSearch

16-07-2003 at 04:57 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Printing : How can I print an active web page from VB form in which I used ActiveX Web Browser?
Previous Topic (run time error)Next Topic (Upside down ...) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder