# VBForums CodeBank > CodeBank - Other >  [DELPHI] - Create a new menu in the Delphi IDE!

## Madboy

Here is how you can create a submenu into the existing Delphi IDE menu system. The code first grabs the handle of the menu and implements the newly defined menu into it:



```
uses ToolsApi, Menus;

var
  item: TMenuItem;
begin
  {Get reference to the Delphi mainmenu. You can handle it like a standard TMainMenu}
  with (BorlandIDEServices as INTAServices).GetMainMenu do
  begin
    item:= TMenuItem.Create(nil);
    item.Caption:= 'new menu caption';
    Items.Add(item);
  end;
end;
```

----------

