🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #352

Re: restart exe

#352
From: Ed Mulroy [TeamB]
Date: Fri, 09 May 2008 21:35
19 lines
1716 bytes
You can restart by setting all things back to how they were at the beginning 
and running from where you started.

If what you want is to load a new copy of the program and run that then one 
way is to call CreateProcess to start that new copy, specify a parameter on 
the command line which tells the program that it is a restart, perhaps 
giving the HWND of the main window so that the new copy can, once it 
initializes, place its windows at the same place and send a message to the 
original which the original will use as a command to end.

.  Ed

> bar wrote in message
> news:4824b804@newsgroups.borland.com...
> Hope everybody well.
>
> I want to have a button(Restart exe) on one of my program.
> Is there any way to restart the application.
> Thanks for pointer.
Technical Details
Message-ID: <4824c3b9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.arglkargh.de!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4824b804@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ca552fa2ff07584b
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4824b804@newsgroups.borland.com>
Subject: Re: restart exe
Date: Fri, 9 May 2008 17:35:55 -0400
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 71.77.48.179
Message-ID: <4824c3b9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1210368953 71.77.48.179 (9 May 2008 14:35:53 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.arglkargh.de!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail