Hi All,
How to add Icons to Submenus
How do i add Imagelist to Menu Editor
anybody pls Guide........
Thanks.........
:eek2:
Added [RESOLVED] to thread title and green "resolved" checkmark - Hack
Printable View
Hi All,
How to add Icons to Submenus
How do i add Imagelist to Menu Editor
anybody pls Guide........
Thanks.........
:eek2:
Added [RESOLVED] to thread title and green "resolved" checkmark - Hack
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
Yes, I hope there is no option to add icons to vb standard menu items. but you can try from some 3rd party controls.
3rd party components are available as i've said at vbaccelerator... although you have to build your menu through pure code....
clickhere
Thanks all of U
Nice Day
Through APIs
VB Code:
'This project needs a form with a menu with at least one submenu 'It also needs a picturebox, Picture1, that contains a small b/w bitmap Const MF_BYPOSITION = &H400& Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long 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 Private Sub Form_Load() 'KPD-Team 2000 'URL: [email][email protected][/email] 'E-Mail: [email][email protected][/email] Dim hMenu As Long, hSubMenu As Long 'get the handle of the menu hMenu = GetMenu(Me.hwnd) 'check if there's a menu If hMenu = 0 Then MsgBox "This form doesn't have a menu!" Exit Sub End If 'get the first submenu hSubMenu = GetSubMenu(hMenu, 0) 'check if there's a submenu If hSubMenu = 0 Then MsgBox "This form doesn't have a submenu!" Exit Sub End If 'set the menu bitmap SetMenuItemBitmaps hSubMenu, [B]0[/B], MF_BYPOSITION, Image1.Picture, Image1.Picture End Sub
The bold number is the submenu number starting from 0
damn... i didn't know that, honestly... :) anyways, i learn by each day i stay in this forums...
is 0 index value of the submenu????Quote:
hSubMenu = GetSubMenu(hMenu, 0)
you can also try menucreator... just search it over the net..
No, that is not Index, but position of SubMenu within the main Menu.Quote:
Originally Posted by noielen
example: if a menu is like-
then 0 assigns image to Open, and if you use 1, then it will create icon for Save.VB Code:
File ...Open 'Position is 0 ...Save 'Position is 1