|
-
Nov 18th, 2006, 07:01 AM
#1
Thread Starter
Lively Member
[RESOLVED] open form on button click
Im using this code atm,
VB Code:
private void button2_Click(object sender, EventArgs e)
{
Form2.ActiveForms();
}
but it wont work, and the Form2.open wont either... how do you open a new form on button click, Ive allready created the form so i just need to open it.
-
Nov 19th, 2006, 10:43 AM
#2
Re: open form on button click
You first need to create an instance of the form and then open that.
Code:
private void button1_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
f.Show();
}
-
Nov 19th, 2006, 10:47 AM
#3
Thread Starter
Lively Member
Re: open form on button click
[edit] my bad, i forgot that C# is case sensitive...
heres the code
Code:
private void button2_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
f.Show();
/*MessageBox.Show("This function is not implemented yet");*/
}
Thx btw
Last edited by RoflJOE; Nov 19th, 2006 at 11:29 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|