怎么样停止程序运行?

sunboy2002 2003-01-20 03:29:43
在我的界面中有一个进度条正在拷贝文件,旁边有一个取消button,我想在拷贝的过程中可以终止拷贝,请问button的onclick事件怎么写?
...全文
24 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
windstrom 2003-01-21
  • 打赏
  • 举报
回复
Ends application execution.
结束应用程序执行 ----->>>取之DELPHI的帮助

procedure Terminate;

windstrom 2003-01-21
  • 打赏
  • 举报
回复
the following code shuts down the application when anexception is not caught and handled.
当异常没有被捕抓到或是被关闭下面的代码会关闭该应用程序

procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnException := AppException;

end;

procedure TForm1.AppException(Sender: TObject; E: Exception);

begin
Application.ShowException(E);
Application.Terminate;
end;

wangzn1979 2003-01-21
  • 打赏
  • 举报
回复
揭帖拉
huangrenguang 2003-01-20
  • 打赏
  • 举报
回复
BOOL TerminateThread(

HANDLE hThread, // handle to the thread
DWORD dwExitCode // exit code for the thread
);
huangrenguang 2003-01-20
  • 打赏
  • 举报
回复
BOOL TerminateProcess(

HANDLE hProcess, // handle to the process
UINT uExitCode // exit code for the process
);
wenxj 2003-01-20
  • 打赏
  • 举报
回复
Application.Terminate;

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧