[英]Windows desktop application open URL in a new browser window instead of a new tab
[英]Opening a URL in the default browser in a Windows 8 desktop application
我从桌面应用程序使用System.Diagnostics.Process.Start
启动默认浏览器访问链接,如下所示。 这是在Windows 8 Pro RTM上使用C#和.NET 4.0。
System.Diagnostics.Process.Start(new ProcessStartInfo
{
FileName = @"http://www.google.com",
UseShellExecute = true
});
这在Windows 7下工作正常,但在Windows 8下我得到一个可以在LINQPad中重现的异常。 例外情况是:
UseShellExecute = true
给出Win32Exception:类未注册。 UseShellExecute = false
给出Win32Exception:系统找不到指定的文件。
如何在默认浏览器中打开URL?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.