在使用Process类来打开文件时,如果文件类型未知,会得到错误代码为ERROR_NO_ASSOCIATION 的Win32Exception。解决方法很简单显示“Open With”对话框
显示“Open With”对话框ProcessStartInfo test = new ProcessStartInfo(); 
显示“Open With”对话框
显示“Open With”对话框       test.FileName 
= "wjh.wjh";    
显示“Open With”对话框
显示“Open With”对话框       test.ErrorDialog 
= true;//就是他
显示“Open With”对话框

显示“Open With”对话框       Process.Start(test);
显示“Open With”对话框
这样就会显示“Open With”对话框了

相关文章: