🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #58256

Re: Xnews suggestion: Restore window on multiple instances

#58256
From: Wayne Menzie
Date: Sun, 20 Feb 2000 00:00
30 lines
1752 bytes
mrh99@uswest.net (Matthew Haley) wrote in 
<8EE06FFAmrh99uswestnet@207.225.159.8>:

>>>You are already preventing multiple instances of Xnews.  Would you
>>>consider restoring the previous instance if it is minimized when you
>>>try to start a new one?
>>>
>>
>>It doesn't do that now?  That's strange.  I do have 
>>Application.BringToFront in the restart routine.
>
>If Xnews is behind another window and you try to open another instance, 
>then Xnews will come to the front. If Xnews is minimized, it doesn't do 
>anything.

Thanks.  That was the behavior I was trying to describe.

Luu, something like this should do the trick:

if IsIconic(Application.Handle) then
begin
  Application.MainForm.WindowState := wsNormal;
  Application.Restore;
end;
SetForegroundWindow(Application.MainForm.Handle);


Wayne Menzie

Technical Details
Message-ID: <8EE054B46wayneshammalammading@24.128.44.7>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <8EDE93F1Awayneshammalammading@216.64.31.80> <8EDFD9EC6luutrangeocities@207.69.128.199> <8EE06FFAmrh99uswestnet@207.225.159.8>

Show Full Headers
Complete Article Headers
Message-ID: <8EE054B46wayneshammalammading@24.128.44.7>
Subject: Re: Xnews suggestion: Restore window on multiple instances
Date: Sun, 20 Feb 2000 00:00:00 +0000
From: waynem@bosmedtechdotcom.nospam (Wayne Menzie)
References: <8EDE93F1Awayneshammalammading@216.64.31.80> <8EDFD9EC6luutrangeocities@207.69.128.199> <8EE06FFAmrh99uswestnet@207.225.159.8>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 587529394
X-Complaints-To: abuse@mediaone.net
X-Trace: wbnws01.ne.mediaone.net 951054434 24.218.162.129 (Sun, 20 Feb 2000 08:47:14 EST)
Organization: Boston Medical Technologies
User-Agent: Xnews/03.01.23
NNTP-Posting-Date: Sun, 20 Feb 2000 08:47:14 EST
Newsgroups: news.software.readers