请问c#中如何调用运行exe程序???
是另开一个进程么?
高手最好举一个例子!
问题点数:50、回复次数:5Top
1 楼CForce()回复于 2002-03-02 19:33:53 得分 25
using System;
using System.Diagnostics;
class shell
{
static void Main()
{
Process p=new Process();
p.StartInfo.FileName="notepad.exe";
p.Start();
}
}Top
2 楼songhtao(三十年孤独)回复于 2002-03-02 19:56:51 得分 20
用api呀
The ShellExecute function opens or prints a specified file. The file can be an executable file or a document file. See ShellExecuteEx also.
HINSTANCE ShellExecute(
HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);
Top
3 楼xming076(虚名)回复于 2002-03-02 20:19:43 得分 5
老问题了,前面已经有人问过了。Top
4 楼sonic_dai()回复于 2002-03-02 21:44:16 得分 0
CFore:你的程序我写在asp。net脚本中,没结果啊!Top
5 楼sonic_dai()回复于 2002-03-03 09:15:33 得分 0
有问题啊!Top




