🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Modal Form in MDI Application

#4447
From: saravanan
Date: Wed, 25 Jan 2006 14:46
60 lines
2930 bytes
Hi

  Thanx a lot.  There is only one problem.  Since the popup window is
StayonTop window,  it stays on top above all child windows.  Is there any
way that, i can make the child windows to display above the popup window.
In other words, Only the window which invoked the popup window should be
behind popup window.  When the select the other child window, selected
window should come on top of the popup window.

Regards,
Saravanan A

"Hans Galema" <notused@notused.nl> wrote in message
news:43d78296@newsgroups.borland.com...
> saravanan wrote:
>
> >    I have 3 child windows in my MDI application.  When a button is
clicked
> > on first child, i will display a MODAL form.  Since the invoked form is
> > MODAL, i could not able to operate on any of the child form.  Is there
any
> > way to override this ?  I need to operate on other 2 child form.  In
other
> > words, Form that invokes the modal form should alone be blocked and all
> > other child windows should be operatable. How to do this ?
>
> Do not show that form modal but make FormStyle fsStayOnTop and
use ->Show().
>
> Disable that child. Enable again when the fsStayOnTop is closed:
>
>
> //fsMDIChild
> void __fastcall TForm3::Button1Click(TObject *Sender)
> {
>       TForm4 *Form = new TForm4(this );
>
>       Enabled = false;
>
>       Form->Show();
> }
>
> //fsStayOnTop
> void __fastcall TForm4::FormCloseQuery(TObject *Sender, bool &CanClose)
> {
>    TForm *Form = dynamic_cast<TForm*>(Owner);
>
>    if ( Form )
>       Form->Enabled = true;
> }
>
//--------------------------------------------------------------------------
-
>
> void __fastcall TForm4::FormClose(TObject *Sender, TCloseAction &Action)
> {
>    Action = caFree;
> }
>
> Hans.
Technical Details
Message-ID: <43d78ea0@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43d777fd@newsgroups.borland.com> <43d78296@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4e4d4e40aee3f82a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "saravanan" <asaravanan@ften.com>
From: "saravanan" <asaravanan@ften.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43d777fd@newsgroups.borland.com> <43d78296@newsgroups.borland.com>
Subject: Re: Modal Form in MDI Application
Date: Wed, 25 Jan 2006 20:16:42 +0530
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: 203.199.207.189
Message-ID: <43d78ea0@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1138200224 203.199.207.189 (25 Jan 2006 06:43:44 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail