从Windows应用程序重定向到网站 [英] Redirection to website from windows application
本文介绍了从Windows应用程序重定向到网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在按钮事件中,当按钮在Windows应用程序中单击时如何将其重定向到网站?
In a button event how do i redirect it to website when the button get clicks in windows application?
推荐答案
Process.Start("http://www.yourwebaddress.com");
把它放在按钮点击事件中。这将打开您的默认Web浏览器到网站,这是我从Windows窗体应用程序中知道的唯一重定向。
Put that in the button click event. That will open your default web browser to the website, thats the only kind of "redirect" I know of from a windows forms application.
string strUrl =http://google.com ;
流程proc = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(strUrl);
proc.StartInfo = startInfo;
proc.Start();
string strUrl = "http://google.com";
Process proc = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(strUrl);
proc.StartInfo = startInfo;
proc.Start();
这篇关于从Windows应用程序重定向到网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文