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.
精彩评论