Jump to content

Recommended Posts

Posted

Hi,

 

I am making an application in c# but need help as I want it so when a user clicks on a button a new form popups. Can anyone point me in the right direction?

Posted

Hi,

 

If you second form is called Form2 you can simply call the following code inside your buttons onclick event function:

 

Form2 newform = new Form2();

newform.Show();

Posted
Hi,

 

If you second form is called Form2 you can simply call the following code inside your buttons onclick event function:

 

Form2 newform = new Form2();

newform.Show();

 

Yep. This is right but make sure that Form2 is actually the name of the second form in the designer. What software are you using to program in?

Posted
The more I use it, the more I realise what a great language it is - very much like Java but with a great IDE and a lot of the minor hassles sorted out. :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...