保存为Vb.net创建的geckowebbrowser表单中当前html页面的按钮 [英] Save as button for current html page in geckowebbrowser form created by Vb.net

查看:246
本文介绍了保存为Vb.net创建的geckowebbrowser表单中当前html页面的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我使用GeckoFX制作了Web浏览器在VB.NET中如何创建自定义按钮控件来保存当前的html页面,因为下面的代码不像Visual Studio工具中的普通webbrowser那样工作



Geckowebbrwoser.show另存为对话



所以如果您向我们提供将此功能添加到我的项目所需的代码,请将非常感谢。



提前致谢。

Hello everybody , I made Web Browser using GeckoFX In VB.NET but how to create a custom button control for saving the current html page as the following code is not working like the normal webbrowser in Visual studio tools

Geckowebbrwoser.show save as dialogue

So. please it would be highly appreciated if you kindly provide us with the codes needed for adding this feature to my project.

Thanks in advance.

推荐答案

根据您的GeckoFX版本,您应该可以调用.Navigate(view-source:+ url);在它上面获取页面源。然后,您可以实现显示保存对话框并自己将源保存到文件中(GeckoFx外部)。



更新(来自评论):您也可以通过其他方式工作周围。向用户显示一个保存对话框,然后调用.SaveDocument(filename),其中包含在保存对话框中输入的文件的完整路径。
Depending on your GeckoFX version, you should be able to call .Navigate("view-source:" + url); on it to get the page source. You can then implement showing the Save dialog and Saving the source to the file yourself (outside GeckoFx).

Update (from comments): You can also work the other way around. Show the user a save dialog, then call .SaveDocument(filename) with the full path to the file that was entered in the save dialog.


这篇关于保存为Vb.net创建的geckowebbrowser表单中当前html页面的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆