Topic: Restart an application

Is it possible to restart an app on click of a button within app? If so, how?


Running an app build with MVD. Within the app I click on a button (i.e. restart button) and application closes and restarts itself.

Adam
God... please help me become the person my dog thinks I am.

Re: Restart an application

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    OpenFile(Application.ExeName);
    Form1.Close;
end;
Dmitry.

Re: Restart an application

Thanks a lot Dmitry....

Looks like you missed Apostrophe. The following worked for me:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    OpenFile('Application.ExeName');
    Form1.Close;
end;
Adam
God... please help me become the person my dog thinks I am.

Re: Restart an application

No need apostrophe there.

Dmitry.