• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

MDI Child Activated event not fired......

Hi

I am working in Visual Studio 2005 C#. In Mdi application ,i have two forms. from FormA button i call FormB. User enter some value in FormB->textbox. I need this textbox value in activated/enter event of  FormA. But neither Activted event fires nor enter event fires.


pl help......
0
HarjeetSingh
Asked:
HarjeetSingh
1 Solution
 
FittsimCommented:
I have done something similar to this.

In Form2 I have

private void textBox1_TextChanged(object sender, EventArgs e)
        {
            myFunction(ref this.textBox1);
        }

        private void myFunction(ref TextBox myTB)
        {
            if (myTB.Text == "Go")
            {
                Form3 fTarget = new Form3();
                fTarget.DoMyBidding(ref myTB);
                fTarget.Show();
            }
        }

in Form3 I have

public void DoMyBidding(ref TextBox myTB)
        {
            this.button1.Text = myTB.Text;
        }

Which triggers events, and as long as I have my fTarget object still created anything inside Form2:myFunction has access.  Im not exactly sure what you are trying to pass, and I have shown the 'ref' so that you still have access to the object from Form2 in Form3.

Hope this helps.
0
 
HarjeetSinghAuthor Commented:
I have solved my pblm ....

Thanxs for your reply Fittsim


Bye
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now