Article View: borland.public.cppbuilder.nativeapi
Article #1258Re: How to bring window (TForm) front
From: Richard Kavanagh
Date: Mon, 24 Sep 2007 18:35
Date: Mon, 24 Sep 2007 18:35
19 lines
1768 bytes
1768 bytes
> Well, my application, which is often in the system tray, gets restored to
> the desktop when the second instance executes the code I posted earlier.
> Does it not work for you? How are you minimizing your app to the tray?
> - Dennis
Dennis, I modified a TrayIcon component I found, (Apologies to the writer -
I did not save your name) I think thev relevant function is:-
void __fastcall TrkTrayIcon::MainFormVisible(bool AVisible)
{
// Do not change at Designtime...
if(!ComponentState.Contains(csDesigning))
{
if((Application->MainForm != NULL) &&
Application->MainForm->HandleAllocated())
Application->MainForm->Visible = AVisible;
}
}
Technical Details
Message-ID:
<46f80367@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2.arglkargh.de!news.n-ix.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<46eecb19@newsgroups.borland.com> <46f793b2$1@newsgroups.borland.com> <46f7ea4e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,67bd98c5f67e7407 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Richard Kavanagh" <dd.foldhill[at]googlemail.com> From: "Richard Kavanagh" <dd.foldhill[at]googlemail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <46eecb19@newsgroups.borland.com> <46f793b2$1@newsgroups.borland.com> <46f7ea4e$1@newsgroups.borland.com> Subject: Re: How to bring window (TForm) front Date: Mon, 24 Sep 2007 19:35:24 +0100 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 84.92.225.65 Message-ID: <46f80367@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1190658919 84.92.225.65 (24 Sep 2007 11:35:19 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2.arglkargh.de!news.n-ix.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail