从打开Windows窗体的URL [英] Open a URL from Windows Forms

查看:235
本文介绍了从打开Windows窗体的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图提供从Windows窗体链接到我公司的网站。我想又乖又推出使用用户的preferred浏览器。

I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser.

什么是从Windows窗体应用程序中打开用户的默认浏览器的URL最好的方法是什么?

What is the best way to open a URL in the user's default browser from a Windows Forms application?

推荐答案

文章将指导您完成它。

简短的回答:

ProcessStartInfo sInfo = new ProcessStartInfo("http://mysite.com/");  
Process.Start(sInfo);

这篇关于从打开Windows窗体的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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