Search code examples
delphidelphi-7menuitemdelphi-2006

Delphi IDE custom menu items, how to Add them?


I am working on a project using Delphi 7 and Delphi 2006, i am developing a component that will get certain system information. Now the requirement is that after the component is installed on the system, there should be a menu item on the IDE , like this

enter image description here

and for delphi 7 like this enter image description here

i have searched on the net about adding a menu item but i have not got anything to add an item to the IDE like the one EurekaLog has. can any body tell me how to add the item like EurekaLog or mysql ? is it some where in the registry?


Solution

  • To add a menu to the Delphi IDE you must use the Delphi Open Tools API. from here you can access the Main menu of the delphi IDE using a code like this.

    LMainMenu:=(BorlandIDEServices as INTAServices).MainMenu;
    

    or

    LMainMenu:=(BorlandIDEServices as INTAServices).GetMainMenu;
    

    And then add the menu items which you want.

    Check these links for additional samples