[[Property:title|Menus]]
[[Property:weight|-10]]
[[Property:uuid|5a32fed4-0b46-51f8-a6b6-fc3eac70a844]]
<div> 
[[Image:menu-principal|Hello world form]]  
</div>
<br/>
<br/>


==Compiling==

==Running==

After launching the application, you will see a window displayed with a similar appearance to the one above. The main window contains a main menu with two entries (File and Format). 

The main window also has a blue <span>LABEL</span> that contains a context menu, that is the clone of "Format" in the main menu. Right click on the <span>LABEL</span> and a context menu will appear

[[Image:menu-contextuel|context menu]] . 



==Under the Hood==

This application shows how to create a main menu and how to associate a context menu to a control (here to a <span>LABEL)</span>. More information regarding the use of menus, is available [[Menu Details|here]] . 

This sample uses the following classes:
*  <span>FORM</span> 
*  <span>CONTEXT_MENU</span> 
*  <span>MAIN_MENU</span> 
*  <span>MENU_ITEM</span> 
*  <span>EVENT_HANDLER</span> 
*  <span>LABEL</span> 

==Notes==

This sample is translated from the example located in the QuickStart\winforms\samples\menus subdirectory of the .NET Framework SDK samples directory of Microsoft Visual Studio.NET. 








