procedure TForm1.SpeedButton1Click(Sender: TObject);
var wpath :String;
begin
wpath:=extractfilepath(paramstr(0));
wpath:=wpath+'\exe';
winexec(pchar(wpath),Treg.exe);//报错:未声明标识'Treg'
end;
请教如何解决啊!
var wpath :String;
begin
wpath:=extractfilepath(paramstr(0));
wpath:=wpath+'\exe';
winexec(pchar(wpath),Treg.exe);//报错:未声明标识'Treg'
end;
请教如何解决啊!
解决方案 »
- 我使用shellexecute或shellexecuteex打开文档(不是Exe),如何才能获取打开的文件顶级窗口句柄?或根据返回进程ID获得句柄?
- delphi中类的构造函数与析够函数
- TMemo控件如何显示滚动条
- 大虾们帮我看看错在哪了?excel2access问题~
- 如何使用ZLib单元的方法完成压缩整个目录,并且解压后目录结构不发生变化
- ... 关于ADOQuery的Update异常问题,大家给看看,谢谢了。在线等...
- 各位高手, 請教怎樣把掃描儀掃描的*.jpg轉換成*.xls?急!急!急.....
- 用delphi的languages做多语言版本的疑惑!
- 欢迎进来!不会有错
- 向各位高手请教
- 小问题,继续散!
- dll传递字符串的问题
怎么回事啊,Treg.exe是不是要引用啊
winexec('Treg.exe',1);//
1是什么做用啊,没有报错,但运行后没有执行Treg程序啊!
UINT uCmdShow // window style for new application
);
ParameterslpCmdLinePoints to a null-terminated character string that contains the command line (filename plus optional parameters) for the application to be executed. If the name of the executable file in the lpCmdLine parameter does not contain a directory path, Windows searches for the executable file in this sequence: 1. The directory from which the application loaded.
2. The current directory.
3. The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
4. The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
5. The directories listed in the PATH environment variable. uCmdShowSpecifies how a Windows-based application window is to be shown and is used to supply the wShowWindow member of the STARTUPINFO parameter to the CreateProcess function. For a list of the acceptable values, see the description of the nCmdShow parameter of the ShowWindow function. For a non-Windows - based application, the PIF file, if any, for the application determines the window state. Return ValuesIf the function succeeds, the return value is greater than 31.
If the function fails, the return value is one of the following error values:
winexec(pchar(wpath+Treg.exe),SW_SHOWNORMAL);
大概是可以这样写,
行了,winexec(pchar(wpath+‘Treg.exe’),1);帮助看懂了一些,但不是很清楚。
你有没有中文的啊!