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


==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 LABEL that contains a context menu, that is the clone of "Format" in the main menu. Right click on the LABEL 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 LABEL). More information regarding the use of menus, is available [[Menu Details|here]] . This sample uses the following classes: * FORM * CONTEXT_MENU * MAIN_MENU * MENU_ITEM * EVENT_HANDLER * LABEL ==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.