Solved

Windows Forms

Posted on 2004-04-26
2
198 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
  • 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 20 total points
ID: 10916702
To open a new form :

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now