开发者

How do I launch the default browser with a web page?

I'd like to launch a web browser to visit a location in google maps开发者_如何学Python from my C++/CLI .net program. What's the simplest way to launch the users current default browser?


I got it from another post in stackoverflow

Process.Start( 
    new ProcessStartInfo() 
    { 
        FileName = "cmd.exe", 
        Arguments = "/c start http://www.google.com", 
        WindowStyle = ProcessWindowStyle.Hidden, 
        UseShellExecute = false 
    }); 


On .NET, use Process.Start.

On VC++, VB, use ShellExecute.


This is the simple approach I found after some more extensive googling:

System::Diagnostics::Process::Start("http://maps.google.com/");

Cheers for the input all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜