Using objects from object repository

            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)
    AboutBox -> OnClose = AboutBoxClose;
    AboutBox -> ShowModal();


Thanks again for your help!


Damon Chandler <> wrote in message
> Hi Jacques,
> > Thanks for the quick reply. However, your proposed solution
> > works fine when the user click the normal window close button (The small
> > button on the right upper corner) but not when the OK button is pressed.
> > 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
> method from within this event handler...

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

> HTH.

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

> Answers to <Commonly Asked Questions>