Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All,
I have a C# windows base application page where Menu strip is there if I click the particular menu then it should go to specific page but I m not able to write the code can any help me for that


Thanks & regards
Indrajit dasgupta
Posted
Comments
Ankur\m/ 28-Apr-11 1:11am    
"specific page" - you mean specific form in your project?

Create an object of the 'specific' form and call the Show method. Simple!

Hi,

You need to handle click event of Menustrip and you can open a form from there.

For more detail please read these articles
MenuStrip Class

Creating a MenuStrip

Regards
AR
 
Share this answer
 
v2
lets assume the Form you want to go to named Form2 so in the event you want to call the other form from type this code

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


or

Form2 f2 = new Form2();
f2.ShowDialog();  // to use the DialogResult in your Form2


or

Form2 f2 = new Form2();
f2.ShowDialog(this); // to use the Dialog Result in your Form2 and make the first Form nonuseble till Form2 closed
 
Share this answer
 
v2
Comments
charles henington 29-Apr-11 2:14am    
or

Form2 f2 = new Form2();
if (f2.ShowDialog()==DialogResult.Cancel)
return;
DoSomethingHere();
Looks like you have a web dev background. I would recommend that you learn the basics of desktop UI development before venturing further.

Alternatively you could look at WPF/Xaml if you really want the browser application look and feel.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900