Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2008, 12:11 AM
ZarrinPour ZarrinPour is offline
Senior Member
 
Join Date: Jul 2003
Posts: 232
Default How an application can RESTART itself ???

Hi all
i don't want to Advertise here , BUT the same as EurekaLog componenet (www.EurekaLog.com) , how my App can Restart Itself at runtime for some reasons?

Thanks in advance.
Regards.
Reply With Quote
  #2  
Old 02-18-2008, 12:27 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default RE: How an application can RESTART itself ???

In the Destroy create a batchfile and execute the batchfile. At startup delete the batchfile

Objective reality is a delirium caused by lack of alcohol in blood.
There is no place like 127.0.0.1
Reply With Quote
  #3  
Old 02-18-2008, 12:33 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: How an application can RESTART itself ???

Try this:


[DELPHI]USES ShellAPI;
.................................................. .........
.................................................. .........

//Close the current instance.
Application.Terminate;

//Now to start another one.
ShellExecute(Application.Handle,'Open',PAnsiChar(A pplication.ExeName),nil,nil,SW_NORMAL);[/DELPHI]

Regards,
Abdulaziz Jasser
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:29 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.