Link to home
Start Free TrialLog in
Avatar of karra
karra

asked on

C# Windows App

Hello,

I have a Main form 'Parent' and in that form i have a button 'A'. if i click on the button 'A' in the parent form it takes me to a differnt form 'Child'. (like this)

frmA dr = new frmA();
dr.Show();

In 'Child' i have 2 buttons. One: Submit Second: Clear/Close. I have implemented all the funtionality for the 'Child' form.
After validating the 'Child' form the Submit button gets disabled and Clear button becomes Close button.

Now My question is::

When i click the Close button i want the Button 'A' in the 'Parent' form also to get disabled. I mean, After validating, submitting and closing the  child form the Button on the Parent form should also get disabled. How can i do it?
ASKER CERTIFIED SOLUTION
Avatar of int_20h
int_20h

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can also have the child form raise an event that the parent catches and then have the parent change the button state
Avatar of karra
karra

ASKER

Can some one show me an example please?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of karra

ASKER

I got along with this problem with a easy answer.

child.ShowDialog(this);
if(!child.IsAccessible)
    btnChild.Enabled = false;