Article View: borland.public.cppbuilder.nativeapi
Article #4452Re: Modal Form in MDI Application
From: Remy Lebeau (TeamB)
Date: Wed, 25 Jan 2006 19:26
Date: Wed, 25 Jan 2006 19:26
36 lines
1933 bytes
1933 bytes
"saravanan" <asaravanan@ften.com> wrote in message
news:43d777fd@newsgroups.borland.com...
> 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 ?
Simply don't display a modal form to begin with. Use Show() instead of
ShowModal().
> 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 ?
You can disable the child form before displaying the non-modal form, and
then reenable the child form when the non-modal form is closed. For
example:
void __fastcall TChildForm::DoSomething()
{
//...
TSomeForm *Form = new TSomeForm(this);
Form->OnClose = FormClosed;
Form->Show();
this->Enabled = false;
}
void __fastcall TChildForm::FormClosed(TObject *Sender, TCloseAction
&Action)
{
this->Enabled = true;
Action = caFree;
}
Gambit
Technical Details
Message-ID:
<43d7d04e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<43d777fd@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 From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <43d777fd@newsgroups.borland.com> Subject: Re: Modal Form in MDI Application Date: Wed, 25 Jan 2006 11:26:44 -0800 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <43d7d04e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1138217038 68.69.17.41 (25 Jan 2006 11:23:58 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail