//可以用API:ShellExecute
//例子如下:注意第三个参数为你要打开的程序,可能与我的机不同,换你要的。using System;
using System.Runtime.InteropServices;
class shell
{
[DllImport ("shell32.dll")]
public static extern int ShellExecute(
int hwnd,
string lpOperation,
string lpFile, //你要打开的文件路径
string lpParameters,
string lpDirectory,
short nShowCmd
); static void Main()
{
ShellExecute(0 ,"OPEN",@"C:\Winnt\NOTEPAD.EXE",null,null,(short)1);
}
}
//例子如下:注意第三个参数为你要打开的程序,可能与我的机不同,换你要的。using System;
using System.Runtime.InteropServices;
class shell
{
[DllImport ("shell32.dll")]
public static extern int ShellExecute(
int hwnd,
string lpOperation,
string lpFile, //你要打开的文件路径
string lpParameters,
string lpDirectory,
short nShowCmd
); static void Main()
{
ShellExecute(0 ,"OPEN",@"C:\Winnt\NOTEPAD.EXE",null,null,(short)1);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货