Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
Starting Default Browser with a Local File from a C# WFA app
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Jerry Fike
7y
217
1
Reply
I've been trying to make an application I'm working on launch my default browser and load a local help file. The code I'm using is:
string target = @"timers.htm";
try
{
System.Diagnostics.Process.Start(target);
}
catch
(
System.ComponentModel.Win32Exception noBrowser)
{
if (noBrowser.ErrorCode == -2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}
This works fine if I use IE or Edge as my default browser, but I really want to use Chrome. But with Chrome set as the default browser, it launches but gives me a "file not found" error.
I suspect I'm missing something simple here but can't seem to track it down. Can anyone help me with this?
Thanks, Jerry
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
i want to print two windows forms in a single a3 paper
Visual Studio 2013 Login form SQL with phpmyadmin