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

x
?
Solved

Windows Forms

Posted on 2004-04-26
2
Medium Priority
?
207 Views
Last Modified: 2010-04-15
Hi as real newbie to C# im in need of help on a basic question,

Ive created a windows form, and have created a button on that form but on the click event i want to open another form I have called frmMainmenu.

-
DW
0
Comment
Question by:back2back
[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
2 Comments
 
LVL 4

Expert Comment

by:Jarodtweiss
ID: 10916699
You have to create an handler that will have that signature :

private void Button1_Click(object sender, System.EventArgs e)

and you have to associate that handler with the click event of the button (click on the button on design, go to the properties tab, display the events, locate the Click event and associate your handler)

Much more simpler, double click on your button : .NET will generate the code and association !
0
 
LVL 4

Accepted Solution

by:
Jarodtweiss earned 80 total points
ID: 10916702
To open a new form :

frmMainmenu myForm = new frmMainmenu();
myForm.ShowDialog();
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 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