Click here to Skip to main content
15,441,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one child Form (Form2) in a MDI project with one label and one button control.
Form2 also having a public Sub ChangeText(). When run this SUB changes the Label text.
On clicking the Button one Modal Form will pop up. This modal Form also having a Button.
On clicking the Modal Form Button, Modal Form will Close and Label in Form2 Text Changed.

But this is not happening. Note that Form2 is a MDI Child form.

Any one please suggest how do I do this.

Thanks a lot. I have got the mistake I was making.
No need to suggest any. Thanks.

What I have tried:

I have created a property in the MDI Parent Form (Form1). When property value changes it triggered an event. I added AddHandler (Property value changed event), addressOf the public Sub of Form2. Modal Form Button changes the Form1 Property Value, which raises the event and event handler runs the public Sub of Form2. Actually the sub changes the Text of the label but it is not shown. Since the label is auto size, its width changes.
Updated 22-Dec-20 23:58pm
CHill60 22-Dec-20 10:44am    
Sharing the code that does all this is a really good idea

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900