Results 1 to 1 of 1

Thread: VB - Add icons, sidebars and sub-titles to your menu

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    VB - Add icons, sidebars and sub-titles to your menu

    Here is a great way to add icons, sidebars and small sub-titles to your menu to give your application a professional look. It's one Class Module and two normal Modules.

    This code is not written by me, but by somebody named La Volpe. I'm just posting it here to share it with you. It's quite a lot of code and it will make your application about 100kB bigger, but it's very easy to use. It's also fully commented.





    Add an ImageList to your form (Project -> Components -> Microsoft Windows Common Controls 6.0).

    1) Right-click on the added ImageList and select Properties.
    2) In the General tab, set the size to 16 x 16.
    3) In the Image tab, click on 'Insert Picture...' and add your icons.
    4) Add SetMenus hwnd, ImageList1 to the Form_Load event (see sample project)
    5) Create your menu and add {img:1}, {img:2}, etc in front of the names of the menu options (see sample project)
    6) To add a sub-title in your menu, simply add -My Title between the menu options (see sample project)
    7) To add a sidebar, see the sample project or look at the comments in modMenusXP.bas.

    Have fun
    Attached Files Attached Files
    Last edited by Chris001; Feb 3rd, 2006 at 12:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width