I dont think its such a hard Question. I am New in C#.
IN Vb i do this in that fashion

Dim FrmChild As Object
FrmChild = Me.ActiveMdiChild
FrmChild.NewButton()

And its work But in C# it generate error on NewButton()

You need to ensure that the MDI Child has a method called NewButton and that the method is declared as Public.

You need to ensure that the MDI Child has a method called NewButton and that the method is declared as Public.

NewButton is a public Method. but i resoled it like this:

try
            {
                FormCollection fc = Application.OpenForms;
                foreach (Form f in fc)
                {
                    if (f.Name == "Frm_Supplier")
                    {
                        ((Frm_Supplier)(f)).NewButton();
                    }
                }
            }
            catch
            {
                Exception Ex = new Exception();
                MessageBox.Show(Ex.Message);
            }

Edited 6 Years Ago by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).

This question has already been answered. Start a new discussion instead.