Can you print a Web page from a Windows application?

Is it possible to Print a Web page directly to the printer from a
Windows application?
LVL 16
MikeMCSDAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jens FiedererTest Developer/ValidatorCommented:
According to documentation at
http://msdn2.microsoft.com/library/4c99xk9c(en-us,vs.80).aspx

you can load a page into a WebBrowser control and print it.

Unfortunately I have Visual Studio 2003, and the ActiveX WebBrowser control (not a .NET control) that it ships with has no print method.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MikeMCSDAuthor Commented:
thanks jens . .
I loaded the COM "Microsoft Web Browser" component
and I also noticed it had no print function.
Right now I'm trying to print the "Form" . . with the component on the page.
DabasCommented:
Hi MikeMCSD:
I suggest you add a PrintDocument to your form and read the examples in Help about it.
With the PrintDocument you can print anything you want in the way you want.

In short, you can read your web page into a webbrowser control, then print it using the PrintDocument control
Dabas
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.