开发者

print html in c# with invisible browser but with visible print dialog

开发者 https://www.devze.com 2023-02-07 10:53 出处:网络
I want to print a ht开发者_如何转开发ml file, though i do not want the browser to be visible, but i want the print dialog to be visible.

I want to print a ht开发者_如何转开发ml file, though i do not want the browser to be visible, but i want the print dialog to be visible.

Thanks, Horea


found the problem. i have to wait for the event DocumentLoaded (or smt like that) to be fired, and then try the print.

thanks


So, just hide the WebBrowser control on your form:

myWebBrowser.Visible = false;

Of course, you can also set this property in the Designer if you never want the control to be visible.

0

精彩评论

暂无评论...
验证码 换一张
取 消