WebBrowser Printing

  • Thread starter Thread starter John Bowman
  • Start date Start date
J

John Bowman

Hi,

I've been reading through the threads on using the WebBrowser control in C#
app's and how to print it's contents. I've got that much working. However,
the big problem is I can't figure out how to detect when the printing is
finished. I've read the article "Printing with the Internet Explorer
WebBrowser Control" and it mentions some sample code in pwaitvb. This
example pretty much useless to me because VB hides the how to do it. I can't
figure out how to wire up the OnAfterPrint event (mentioned in the article)
to a method in my C# class so I can detect when it's finished. Does anyone
know how to do this and/or have some sample code that does it?

BTW, does anyone know why MS doesn't have a true .NET web browser control
available? Seems there's plenty of interest by searching nuermous websites
and newsgroups. Being forced to use COM interop just for displaying/printing
some data seems like a waste.

TIA,
 
Hi John,

MS doesnt have pure native .NET control in place of webBrowser - not
even sure if they plan to do the same in Whidbey .

If there is one afterPrint event, you can easily wireup to that by
making winform as host of that particular interface.

I will send you some sample code snippet after few hours( if there is
AfterPrint event)

Cheers
Nirmal
 
Nirmal,

Thanks for the response. The article mentions an "onafterprint" event that
needs to be sinked. But the example VB code is useless. So, I beleive it's
there, but how to make use of it?... I'm just too much of a newbie w/
mshtml/SHDocVw at this point.

John
 
Nirmal,

Thanks for the post. I read the post below. Unfortunately, it doesn't tell
me anything I haven't already figured out from the article I mentioned. The
link that Jeffry Tan from MS used is to the same article and that doesn't
help me any :(. I appreciate your assistance/persistence.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top