Can someone please tell me if it is possible to inset icons in my menu bar? For instance a diskette next to the save command in the menu.
I have not seen that this is possible so any thoughts or ideas would be greatly appreciated
If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
To get the best response to a question, please check out FAQ222-2244 first
A General Guide To Excel in VB FAQ222-3383
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 GetMenuItemID 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()
Dim i
Dim hMenu, hSubMenu, menuID, x
hMenu = GetMenu(hwnd)
hSubMenu = GetSubMenu(hMenu, 0) '1 for "Other" menu etcetera
For i = 1 To 4
menuID = GetMenuItemID(hSubMenu, i - 1)
x = SetMenuItemBitmaps(hMenu, menuID, &H4, img.ListImages(i).Picture, img.ListImages(i).Picture)
Next
menuID = GetMenuItemID(hSubMenu, 5)
x = SetMenuItemBitmaps(hMenu, menuID, 0, img.ListImages(5).Picture, 0&)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.