Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Opening Windows Application Form

Posted on 2006-11-25
2
Medium Priority
?
231 Views
Last Modified: 2010-04-16
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
0
Comment
Question by:dinesh_bali
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 64

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 18011604
Hi dinesh_bali;

Try it this way.

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


Fernando
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 18011944
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
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question