click on Form1

A

Anne

Guru:
I have a base form say Form1, whenever I click on Form1, Form2 will display.
My question is:
while Form2 is showing, how could I catch click event on Form1?
Here is the fuction to show Form2:

privated: void DoubleClickHandler()
{
Form2->ShowDialog();
Form2->Refresh();
}
 
N

Niki Estner

If you show a form with ShowDialog, all other forms in the same thread will
automatically be disabled (i.e. no more mouse event handling).
ShowDialog opens the form/dialog (modal) and does not return until the user
closes the dialog.

Use Form2.Show(), so you can plug in Form1's Click event from form2 (or from
whereever you'd like)

Niki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top