C# 启动 非 exe 程序 如何用 C# 启动一个 TMP 或者其他后缀名的程序呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Invoke API CreateProcess只要是exe文件 不管后缀名是什么都ok 使用如下的方法来启动一个程序或者文件,只要存在文件并有和其关联的打开程序就一定会打开:Process.Start(fileName) 当然Red_angelX(八戒)的方法也是可以的:) using System.Runtime.InteropServices;[DllImport("kernel32.dll")]internal static extern uint WinExec(string lpCmdLine, uint uCmdShow);private const uint SW_SHOW = 5;private void button1_Click(object sender, EventArgs e){ WinExec(@"c:\temp\temp.tmp", SW_SHOW); } 去MSDN中搜一下Process,这个就能满足你的要求了. c#怎么给winform ListView 中添加 button 万分焦急,谢谢给个正解 如何把当前选中的checkboxlist项,添加到另外一个checkboxlist 问题描述在最后一行- 关于委托列表清空的问题 c#调用C++(DLL)返回值一个小问题! 请求一个编译的问题???????????????????? 高分答谢:WMS StreamWriter 问题 怎么提高编程的技能!! C# 多人聊天 简单问题! c#对DLL怎么引用????
只要是exe文件 不管后缀名是什么都ok
internal static extern uint WinExec(string lpCmdLine, uint uCmdShow);
private const uint SW_SHOW = 5;private void button1_Click(object sender, EventArgs e)
{
WinExec(@"c:\temp\temp.tmp", SW_SHOW);
}