Article View: borland.public.cppbuilder.nativeapi
Article #13956Re: Always On Top
From: Mike King
Date: Tue, 09 Sep 2003 18:58
Date: Tue, 09 Sep 2003 18:58
46 lines
2425 bytes
2425 bytes
Okay. Here's the code for the test application. Create a New Application,
create 2 Forms, add a button to Form1.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Visible = false;
Form2->ShowModal();
Close();
}
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
SetWindowPos(Handle,
HWND_TOPMOST,
0,0,0,0,
SWP_NOMOVE |
SWP_NOSIZE
);
}
"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3f5e1c14$1@newsgroups.borland.com...
>
> "Mike King" <emailMK@excite.com> wrote in message
> news:3f5e1390@newsgroups.borland.com...
>
> > The application that I'm writing has a feature called "Mini
> > Mode" which creates another form which is much smaller
> > and I want that form to "Stay On Top". Do you know how
> > to do that?
>
> SetWindowPos() is the way to go, as already suggested. If it is not
> working, then please show your actual code.
>
>
> Gambit
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
>
>
Technical Details
Message-ID:
<3f5e22d5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!62.132.236.44.MISMATCH!ecngs!feeder.ecngs.de!128.242.171.84.MISMATCH!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f5df558@newsgroups.borland.com> <3f5e05b8$1@newsgroups.borland.com> <3f5e1390@newsgroups.borland.com> <3f5e1c14$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1acbe53880abfff X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-09 12:10:07 PST From: "Mike King" <emailMK@excite.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f5df558@newsgroups.borland.com> <3f5e05b8$1@newsgroups.borland.com> <3f5e1390@newsgroups.borland.com> <3f5e1c14$1@newsgroups.borland.com> Subject: Re: Always On Top Date: Tue, 9 Sep 2003 14:58:51 -0400 Lines: 48 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 68.34.75.85 Message-ID: <3f5e22d5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1063133909 68.34.75.85 (9 Sep 2003 11:58:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!62.132.236.44.MISMATCH!ecngs!feeder.ecngs.de!128.242.171.84.MISMATCH!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail