比如procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(handle,'open',‘c:\bz.exe','nil','nil',SW_SHOWNORMAL);
end;
现在希望在关闭FORM1时,或关闭FORM1所在的工程时,C:\BZ.EXE 能够自动关闭。
begin
ShellExecute(handle,'open',‘c:\bz.exe','nil','nil',SW_SHOWNORMAL);
end;
现在希望在关闭FORM1时,或关闭FORM1所在的工程时,C:\BZ.EXE 能够自动关闭。
解决方案 »
- 有没有支持PNG的button,有hot 、down 、up加载PNG图片的功能?
- WebBrowser控件,在浏览网页时,要下载一个文件的时候,我想弹出自己的对话框,进行下载。大家有办法吗?
- 后面两句vb语句,用delphi怎么写 Dim word As Aspose.Word.Word = New Aspose.Word.Word(); Document doc = word.Open("MyDocument.doc
- 运行delphi时出现的错误!帮忙看看,在线等.谢了!
- Midas问题,提示"类没有注册"。急,在线等。
- 无法使用mysql数据库
- 时间段的累加,高分考验你
- 关于DLL
- paradox数据库查询,判断时间大小问题-在线等待!
- 讨论学习Delphi,进者有分
- 获得的选定多行数据
- 车票精确打印
///////////////////////////////////////////
WINSHELLAPI BOOL WINAPI ShellExecuteEx(
LPSHELLEXECUTEINFO lpExecInfo
); Performs an action on a file. Returns a nonzero value if successful, or zero otherwise. To get extended error information, call theGetLastError function.
lpExecInfo
Address of a SHELLEXECUTEINFO structure that contains and receives information about the application being executed.
If the function succeeds, it sets the hInstApp member of the SHELLEXECUTEINFO structure to the instance handle to the application that the function started. If the function fails, hInstApp is one of the SE_ERR_ error values indicating the cause of the failure. (An instance handle will always be greater than 32 and an error value less than 32.) Note that the SE_ERR_ error values are for compatibility with the ShellExecute function; use theGetLastError function to retrieve error information.
同志:稍微给点中文解释吗,我有点菜啊,仿佛已经看到正确答案了,麻烦了