Using objects from object repository

Damon,
            Easy enough, it worked! However, I had to change your code a bit
otherwise I ran into the following problem: As soon as the user would click
anywhere on the form, including the disabled button, the "About" form would
close but all the buttons remained disabled. The only option was to exit the
program. I still need to use ShowModal but, this time, it is inline with the
rest of my interface:

void __fastcall TForm1::AboutButtonClick(TObject *Sender)
{
    EnableAllButtons(false);
    AboutBox -> OnClose = AboutBoxClose;
    AboutBox -> ShowModal();

Quote
}

Thanks again for your help!

Jacques

Quote
Damon Chandler <dm...@cornell.edu> wrote in message

news:37F7E63B.B51EA91@cornell.edu...
Quote
> Hi Jacques,
> > Thanks for the quick reply. However, your proposed solution
> > works fine when the user click the normal window close button (The small
"x"
> > button on the right upper corner) but not when the OK button is pressed.
Do
> > you have any idea how to make the OK button behave the same way?

> You need to provide an event handler for the OK Button and call the
Close()
> method from within this event handler...

> void __fastcall TDialog::OKBtnClick(TObject *Sender)
> {
>     Close();
> }

> HTH.

> --------------------------------------
> Damon Chandler

> http://bcbcaq.freeservers.com
> Answers to <Commonly Asked Questions>