winforms - calling one child form from another child form in c# -


itemprop = "text">

I have 3 forms: FormA, FormB, and FormC, in which formA is the mdiParent form and Form B and C are Child Forms. I will write the following code in FormA Load Event.

  Private zeros frmMain_Load (Object Sender, EventArgs e) {formB.MdiParent = this; // Form B formb form c. MDPER = this is; // formC is an example of Formal Formby. Show (); }  

What do I do when I click on a button on the formab, then the pharmacy must be shown. Now to do this I would need to make another example of the FCCA when the button click in the formality or should I be able to use the built in forma

if there is a need to make a different example Can anyone explain the reason for doing so?

Edit- The answer given by Oedde makes me feel right but can I create return type of property in form [] to add more than 1 reference so that if I withdraw from Formaci from Forma If I want to go, can I use the same method?

I want to pass some data from the pharmacy, so how can I do this?

Your formb to formsCONT is required.

You can add an asset to your FromB to do this:

  the public form formCF {get; Set;}  

then in its main form:

  formB.FormCRef = formC;  

And do this in your FormB class in your event handler:

  FormCRef.Show ();  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -