Re: restart application



Jamie wrote:
Ingolf wrote:
<jimbo@xxxxxxxxxx> wrote in message news:1164362542.923132.96860@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How can I on the click of a button "restart" my program. That is reset
all the defaults. Can a program close and reopen itself? Looked at
initialize but don't understand what it all means. TIA

procedure TForm1.Button1Click(Sender: TObject);
begin
winexec(PAnsiChar(paramstr(0)),SW_SHOWNORMAL);
halt(0);
end;

what if!
The app has code in it to prevent multiple copies?

Well, it's Jim's own program, so he should be able to detect that pretty easily. And if he doesn't know how to address the issue, he can write back with details of how he's preventing multiple copies so we can tell him how to circumvent it.

--
Rob
.


Quantcast