应该可以。
const WM_COMPETION = WM_USER + 100;
TMyThread = class(TThread)
private
m_Handle: HWND;
protected
procedure Execute;
public
constructor Create(CreateSuspended: Boolean;
Handle: HWND);
end;
TMyForm = class(TForm)
...
public
...
procedure OnCompletion(var msg: TMessage);
message WM_COMPLETION;
end;
constructor Create(CreateSuspended: Boolean;
Handle: HWND);
begin
m_Handle := Handle;
inherited Create(CreateSuspended);
end;
procedure TMyThread.Execute;
begin
...
PostMessage(m_Handle, WM_COMPLETION, wParam, lParam);
end;
procedure TMyForm.OnCompletion(var msg: TMessage);
begin
//do
your work.
end;
大致如此。