Alternative Process.Start ()

I am just finishing the coding of a document storage solution, and I ran into the following problem. In the user interface, the user can click a button to open the file:

try
{
    Process.Start(file);
}
catch (Exception ex)
{
    //Error handling code
}

My problem is that if the user does not have an application associated with the file type, a model component exception is thrown with a message about this.

I would prefer the Open With dialog box to appear in this situation, do I have a call method?

+5
source share
4 answers

See this article to use the Open With dialog box.

http://www.codeproject.com/KB/shell/openwith.aspx

Process.Start try, "Open With" catch.

+3

, , , , Process.Start. , .

+5

, . , . , - , , , .

+1
Process.Start("explorer.exe",file) 

.

Solves the problem of opening URLs in XP, Vista and 7

+1
source

All Articles