Hi
Send a message to the form's 'Handle' via 'PostMessage' or 'SendMessage'.
"uses LCLIntf,LMessages;" // in both form-unit and your compression-unit
in compression unit:
const
LM_COMPDONE = LM_USER + 5; // arbitrary number
...
// when done compressing:
"PostMessage(the-Handle-from-form,LM_COMPDONE,1,1);"
in form unit:
create a message handler in your form:
TForm1 = class(TForm)
...
public
...
procedure LMCompDone(var Message: TLMessage); message LM_COMPDONE;
end;
You somehow have to get the form's handle to the compression-unit and keep it safe there, till it's time to send the message...
That's a clean & easy way to communicate, should be thread-safe too...
HTH
Regards Benny