Results 1 to 12 of 12

Thread: [RESOLVED] How to Add Icons Submenu in Menueditor

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    PUNE
    Posts
    222

    Resolved [RESOLVED] How to Add Icons Submenu in Menueditor

    Hi All,

    How to add Icons to Submenus
    How do i add Imagelist to Menu Editor

    anybody pls Guide........

    Thanks.........









    Added [RESOLVED] to thread title and green "resolved" checkmark - Hack
    Last edited by Hack; Jan 20th, 2006 at 06:31 AM.

  2. #2
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: How to Add Icons Submenu in Menueditor

    in the vb default menu? i dont think you can do that... but some "accelerated menus" are available at VBACCELERATOR.com, i'm sure you can add an image list there
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  3. #3
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: How to Add Icons Submenu in Menueditor

    Yes, I hope there is no option to add icons to vb standard menu items. but you can try from some 3rd party controls.

  4. #4
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: How to Add Icons Submenu in Menueditor

    3rd party components are available as i've said at vbaccelerator... although you have to build your menu through pure code....
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  5. #5
    Fanatic Member noielen's Avatar
    Join Date
    Nov 2005
    Location
    Cebu, Phil.
    Posts
    680

    Re: How to Add Icons Submenu in Menueditor

    clickhere

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    PUNE
    Posts
    222

    Resolved Re: How to Add Icons Submenu in Menueditor

    Thanks all of U

    Nice Day

  7. #7
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: How to Add Icons Submenu in Menueditor

    you should search VBF, though they cannot beat VBAccelerator, but some examples are really good. try these:

    Link 1
    Link 2
    Show Appreciation. Rate Posts.

  8. #8
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: How to Add Icons Submenu in Menueditor

    Through APIs

    VB Code:
    1. 'This project needs a form with a menu with at least one submenu
    2. 'It also needs a picturebox, Picture1, that contains a small b/w bitmap
    3. Const MF_BYPOSITION = &H400&
    4. Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
    5. Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    6. Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long
    7. Private Sub Form_Load()
    8.     'KPD-Team 2000
    9.     'URL: [email][email protected][/email]
    10.     'E-Mail: [email][email protected][/email]
    11.     Dim hMenu As Long, hSubMenu As Long
    12.     'get the handle of the menu
    13.     hMenu = GetMenu(Me.hwnd)
    14.     'check if there's a menu
    15.     If hMenu = 0 Then
    16.         MsgBox "This form doesn't have a menu!"
    17.         Exit Sub
    18.     End If
    19.     'get the first submenu
    20.     hSubMenu = GetSubMenu(hMenu, 0)
    21.     'check if there's a submenu
    22.     If hSubMenu = 0 Then
    23.         MsgBox "This form doesn't have a submenu!"
    24.         Exit Sub
    25.     End If
    26.     'set the menu bitmap
    27.     SetMenuItemBitmaps hSubMenu, [B]0[/B], MF_BYPOSITION, Image1.Picture, Image1.Picture
    28. End Sub

    The bold number is the submenu number starting from 0

  9. #9
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: How to Add Icons Submenu in Menueditor

    damn... i didn't know that, honestly... anyways, i learn by each day i stay in this forums...
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  10. #10
    Fanatic Member noielen's Avatar
    Join Date
    Nov 2005
    Location
    Cebu, Phil.
    Posts
    680

    Re: How to Add Icons Submenu in Menueditor

    hSubMenu = GetSubMenu(hMenu, 0)
    is 0 index value of the submenu????

  11. #11
    Lively Member ichix_jaxx's Avatar
    Join Date
    Nov 2005
    Location
    mindanao, philippines
    Posts
    88

    Re: How to Add Icons Submenu in Menueditor

    you can also try menucreator... just search it over the net..

  12. #12
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: How to Add Icons Submenu in Menueditor

    Quote Originally Posted by noielen
    is 0 index value of the submenu????
    No, that is not Index, but position of SubMenu within the main Menu.
    example: if a menu is like-
    VB Code:
    1. File
    2. ...Open 'Position is 0
    3. ...Save 'Position is 1
    then 0 assigns image to Open, and if you use 1, then it will create icon for Save.
    Show Appreciation. Rate Posts.

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