471,354 Members | 1,411 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Open Form

Hi,

I am learning visual C#.Net.I have 2 forms Form1 and Form2.
On a command button click i want to call form2.
How can i do this.?
Thanx

from
Doller

Jan 11 '06 #1
2 8117
First, you'll need to create an instance of Form2...

Form2 form = new Form2();

... and then you'll need to show the form. If you want to display the form
modally, so that the user must dismiss the form before they can return to
Form1, then call the ShowDialog method. Otherwise, call the Show method...

form.Show();

--
Tim Wilson
..NET Compact Framework MVP

"Wenzee" <su********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,

I am learning visual C#.Net.I have 2 forms Form1 and Form2.
On a command button click i want to call form2.
How can i do this.?
Thanx

from
Doller

Jan 11 '06 #2
In the Event for the command Button use:

Form2 form = new Form2();
form.Show();

That's it. :-D

Greetings, Peter

"Wenzee" <su********@gmail.com> schrieb im Newsbeitrag
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,

I am learning visual C#.Net.I have 2 forms Form1 and Form2.
On a command button click i want to call form2.
How can i do this.?
Thanx

from
Doller

Jan 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Konstantin | last post: by
1 post views Thread by petersk | last post: by
14 posts views Thread by Simon Abolnar | last post: by
3 posts views Thread by rdemyan via AccessMonster.com | last post: by
19 posts views Thread by =?Utf-8?B?R3JlZw==?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.