sShowMessage with not skin in Thread

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #38392
    Support
    Keymaster

    Hello! You should use synchronization :

    Code:
    type

    TUpdate = class(TThread)
    protected
    procedure Execute; override;
    procedure ShowDlg;
    end;

    procedure TUpdate.Execute;
    begin
    FreeOnTerminate := True;
    Synchronize(ShowDlg);
    end;

    procedure TForm1.sButton1Click(Sender: TObject);
    var
    Test : TUpdate;
    begin
    Test := TUpdate.Create(True);
    Test.Resume;
    end;

    procedure TUpdate.ShowDlg;
    begin
    sMessageDlg('Test','Test', mtInformation, [mbOk], 1);
    end;

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.