使用.NetStandard打开自定义的外部Web浏览器

问题描述 投票:0回答:1

我们需要能够从我们的应用程序(.NetStandard 2.0)中打开Web浏览器。应将浏览器作为外部应用程序打开,要求不要求将浏览器嵌入到我们的应用程序中,因此,不能选择使用WebBroswer控件。我们需要能够指定以下选项:

  • 浏览器的高度
  • 浏览器的宽度
  • 最高位置
  • 左位置
  • 启用或禁用地址栏
  • 启用或禁用菜单栏
  • 状态栏已启用或禁用
  • 启用或禁用工具栏

起初,我们认为使用Process类是可行的,但似乎无法通过Process类指定这些选项。关于如何实现这一目标的任何文章或建议,将不胜感激!

c# internet-explorer .net-core .net-standard-2.0
1个回答
0
投票

您可以考虑创建Windows Form应用程序或WPF application,然后使用WebBrowser control显示网页。

有关使用WebBrowser控件的更多详细信息,请检查以下链接:

WebBrowser Control Overview

How to: Add Web Browser Capabilities to a Windows Forms Application

How to show address bar in WebBrowser control

WebBrowser Control In WPF

© www.soinside.com 2019 - 2024. All rights reserved.