Newbie-passing variable between MDI child forms

  • Thread starter Thread starter Jeffrey
  • Start date Start date
J

Jeffrey

Hello,


I am devoloping a MDI windows form app. using c#. I had two child form-
frmChild1 and frmChild2. Now I put a textbox(txtUserID) on frmChild1,
after user input text into the textbox, I want a label on frmChild2 can
show the UserID as soon as frmChild2 started.
Could anybody help me on this? Thanks a lot!

Jeffrey
 
Hi,

you can use a user define contructor with frmChild2 and in that contructor
after Initialization() method you can set the new value to the label.

else

if the frmChild1 is the parent form .. make the txtUserID access modifier
property to public and get the value through the parent wondow property of
the midichild.

Nirosh.
 

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

Back
Top