📄 handledthread.pas
字号:
{-----------------------------------------------------------------------------
Unit Name: HandledThread
Author: Paul Fisher / Andrew Semack
Purpose: Base class for the Burn and erase threads
History:
-----------------------------------------------------------------------------}
unit HandledThread;
interface
uses
Windows, Classes, SysUtils, Forms, Messages;
type
THandledThread = class(TThread)
private
FException: Exception;
procedure DoHandleException;
protected
procedure HandleException; virtual;
public
end;
implementation
{ THandledThread }
procedure THandledThread.DoHandleException;
begin
if GetCapture <> 0 then
SendMessage(GetCapture, WM_CANCELMODE, 0, 0);
if FException is Exception then
Application.ShowException(FException)
else
SysUtils.ShowException(FException, nil);
end;
procedure THandledThread.HandleException;
begin
FException := Exception(ExceptObject);
try
if not (FException is EAbort) then
Synchronize(DoHandleException);
finally
FException := nil;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -