Try this approach:
var psi = new ProcessStartInfo
{
FileName = "https://www.google.com/",
UseShellExecute = true,
};
Process.Start( psi );
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello. :)
I created a button inside the Visual Studio form to which I want to assign a link. I’ve watched a lot of videos, I’ve tried a lot already, but it’s always the same end when I click the button. My program freezes and I get the following error message:
Exception Thrown
System.ComponentModel.Win32Exception: 'The specified file cannot be found.'
How can I fix this? Thanks for the help. :)
Try this approach:
var psi = new ProcessStartInfo
{
FileName = "https://www.google.com/",
UseShellExecute = true,
};
Process.Start( psi );
What is your default browser?
Try to specify the browser path, this error may be because the code cannot find your browser.
ProcessStartInfo info = new ProcessStartInfo(@"C:\Program Files\Internet Explorer\iexplore.exe");
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.