Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Close dialog from program instead of by user input

0 views
Skip to first unread message

Rene

unread,
Jul 30, 2008, 3:37:22 PM7/30/08
to
Hello,

In my program at some time there can be a MessageDlg and another one on top
of it that is produced by a timer function. When the user presses a button
on that last one, the first one is not necessary anymore. I have searched
the web but could not find a way to close the first one from within my
program. There are many solutions but they are from people that are using
MFC and the solutions don't seem to work when pasted in BCB.

Does anyone know how to do this in BCB?

Again, all input is highly appreciated!

Thanks in advance.

Yours sincerely,
Rene


Remy Lebeau (TeamB)

unread,
Jul 30, 2008, 4:23:40 PM7/30/08
to

"Rene" <my....@is.nobody> wrote in message
news:4890c2f7$1...@newsgroups.borland.com...

> In my program at some time there can be a MessageDlg and another
> one on top of it that is produced by a timer function. When the user
> presses a button on that last one, the first one is not necessary anymore.
> I have searched the web but could not find a way to close the first one
> from within my program.

Use your own modal TForm instead of MessageDlg(). That way, you can call
the form's Close() method whenever you want. Or, at the very least, call
CreateMessageDialog() directly (which is what MessageDlg() does
internally( instead of creating your own TForm.


Gambit


Rene

unread,
Jul 31, 2008, 8:13:47 AM7/31/08
to
"Remy Lebeau (TeamB)" <no....@no.spam.com> wrote in message
news:4890...@newsgroups.borland.com...

Hello Gambit,

Thank You for Your reply!

Yours sincerely,
Rene


0 new messages