2011-01-29 135 views
0

我需要一种方法来打开默认应用程序的通用文件。如何打开一个通用文件?

例如:如果该文件是一个HTML文件,那么它将用Internet Explorer打开;如果该文件是图像(JPG,BMP等),那么它将以“Paint”打开;如果该文件是MP3文件,则它将使用Windows Media Player打开。

我该怎么做?我必须使用什么功能或API?

+0

可能重复(http://stackoverflow.com/questions/1283584/how-do-i-launch-files-in-c) – abelenky 2011-01-29 22:31:00

+1

@abelenky这是用于C++或C而不用于C#:) – xRobot 2011-01-29 22:32:56

回答