C# 中的 Gecko 用法 (geckofx)
我没有找到如何使用 geckofx 执行以下操作:
获取单击的链接的 URL。
显示打印预览窗口。
geckofx 中有这个功能吗?如果没有,最好的方法是什么 在使用GeckoWebBrowser显示html页面的C#项目中实现它?
谢谢
There are some things that I didn't find how to do using geckofx:
Get the URL of a clicked link.
Display print preview window.
Does this functionality exist in geckofx? If not, what's the best way
to achieve it in a C# project that uses GeckoWebBrowser to display html pages?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
要获取单击链接的 url,您可以使用:
要显示打印对话框,您可以使用:
To get url of clicked link you can use:
To show print dialog box you can use:
OnNaviagted
事件应该为您提供链接,并在 Geckofx 中查找打印接口nsIPrintingPromptService::ShowPrintDialog
。OnNaviagted
event should give you the link, and look for the print interfacesnsIPrintingPromptService::ShowPrintDialog
in Geckofx.这将在我相信 geckoWebBrowser 是控件名称的任何地方为您提供 url,但是正如所指出的,您将能够使用 e.url 从文档完成和导航事件中获取它。
That will give you the url at any point I believe where geckoWebBrowser is the name of the control, however as pointed out you'll be able to get it from the document completed and navigated events using e.url .
如需打印,请参阅此论坛帖子。 请务必阅读全部内容在开始之前。本质上,您必须修补并重新编译 GeckoFX。
For printing, see this forum thread. Make sure to read it all before starting. Essentially you'll have to patch and recompile GeckoFX.