Why does Form-A's instance fire Form-B's event??

Why does Form-A's instance fire Form-B's event??

Post by hyper_x_4 » Thu, 22 Apr 2004 13:33:29


Hi,

I have an MDI application. I'm opening 2 instances of the same form,
Form-A and Form-B.

WHen I have these two instances of same form open, it looks like all
the events are shared between Form-A and Form-B.

Eg., I have a button, which on click, changes the tab from Tab-1 to
Tab-4.

Since, in this case, both Form-A and Form-B have same buttons, the
button click on Form-A changes Form-B's Tab-1 to Tab-4. Which should
not happen. How can I avoid this?

How is this handled in .NET? Shouldn't the events of Form-A be kept
separate from Form-B's events?

Any help is greatly appreciated.

HyperX.
 
 
 

Why does Form-A's instance fire Form-B's event??

Post by Josip Medv » Thu, 22 Apr 2004 15:15:09

> Since, in this case, both Form-A and Form-B have same buttons, the

Could you paste declare and show code for forms?

--

Pozdrav,
Josip Medved, MCSD
http://www.yqcomputer.com/