从Windows应用程序打开网页
问题描述:
嗨frnds,
我有一个包含Windows项目和网站的项目。我想在加载Windows窗体时重定向到这个网站的网页。
有没有办法做到这一点?
Hi frnds,
I have a project that contains a windows project and a website. I want to redirect to the webpage of this website when loading the windows form.
Is there any way to do this?
答
在您加载表单时执行此操作。
Execute this when you are loading your form.
Process.Start(Your url here);
流程类在System.Diagnostics命名空间中
Process class is in System.Diagnostics namespace
您好,
检查这个
Hi ,
Check this
Process printjob = new Process();
printjob.StartInfo.FileName = "www.google.com";
printjob.StartInfo.UseShellExecute = true;
printjob.StartInfo.Verb = "open";
printjob.StartInfo.CreateNoWindow = true;
printjob.Start();
最好的问候
M.Mitwalli
Best Regards
M.Mitwalli