Link to home
Start Free TrialLog in
Avatar of dinesh_bali
dinesh_bali

asked on

Opening Windows Application Form

Hi,

I am making windows application making in C# and using .Net 2005

I have included refernce of some other project .exe made in .Net 2003 in my application

Now, I can access all methods and classes made in the .net2003 project.

Now I want to open the main form from my application

On the .Net Button click I am writting

private void button1_Click_2(object sender, EventArgs e)
        {
            MainScreen mscreen = new MainScreen();
            mscreen.Form1_Load(this, e);
}

But I am not able to open the form how can i do this.

This form is the main form of the application.

Thanks in Advance

Regards
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and this coe:

Hi dinesh_bali;

Try it this way.

private void button1_Click_2(object sender, EventArgs e)
{
        MainScreen mscreen = new MainScreen();
        mscreen.Show();
}


will open the mscreen object for a very brief moment, then it will go out of scope, and disappear.

what are you trying to accomplish, using the command button?

AW