I created great menus, but I can't figure out how to get icons next to the text! I am just using the built-in menu editor for a vb form.
Is there another control I should be using (hopefully free!). Or am I just blind???
Thanks in advance!
Printable View
I created great menus, but I can't figure out how to get icons next to the text! I am just using the built-in menu editor for a vb form.
Is there another control I should be using (hopefully free!). Or am I just blind???
Thanks in advance!
i searched the fourm and found this code:
VB Code:
Declare Function GetMenu Lib "user32" _ (ByVal hwnd As Long) As Long Declare Function GetSubMenu Lib "user32" _ (ByVal hMenu As Long, ByVal nPos As Long) As Long Declare Function GetMenuItemID Lib "user32" _ (ByVal hMenu As Long, ByVal nPos As Long) As Long 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 Public Const MF_BITMAP = &H4& Type MENUITEMINFO cbSize As Long fMask As Long fType As Long fState As Long wID As Long hSubMenu As Long hbmpChecked As Long hbmpUnchecked As Long dwItemData As Long dwTypeData As String cch As Long End Type Declare Function GetMenuItemCount Lib "user32" _ (ByVal hMenu As Long) As Long Declare Function GetMenuItemInfo Lib "user32" _ Alias "GetMenuItemInfoA" (ByVal hMenu As Long, _ ByVal un As Long, ByVal b As Boolean, _ lpMenuItemInfo As MENUITEMINFO) As Boolean Public Const MIIM_ID = &H2 Public Const MIIM_TYPE = &H10 Public Const MFT_STRING = &H0& Private Sub Command1_Click() 'Get the menuhandle of your app hMenu& = GetMenu(Form1.hwnd) 'Get the handle of the first submenu (Hello) hSubMenu& = GetSubMenu(hMenu&, 0) 'Get the menuId of the first entry (Bitmap) hID& = GetMenuItemID(hSubMenu&, 0) 'Add the bitmap SetMenuItemBitmaps hMenu&, hID&, MF_BITMAP, _ Picture1.Picture, _ Picture1.Picture
Go to http://www.vbthunder.com, and look for the menu icons example, if you want to to put 3D icons in your menus (like office 2000).
You could also send out stickers with the icons on them and have the users put the stickers on their monitor next to the menu... or not at all... they may find those little icons annoying... like me.
I like to see/put the icons (3D or flat)next to the menu items.Quote:
Originally posted by DiGiTaIErRoR
You could also send out stickers with the icons on them and have the users put the stickers on their monitor next to the menu... or not at all... they may find those little icons annoying... like me.
You could make fancy embossed stickers!
yah, yah...and what about those office xp like icons?Quote:
Originally posted by DiGiTaIErRoR
You could make fancy embossed stickers!
On stickers?!
Im not sure about the sticker idea...would I have to make different size stickers depending on the users screen size and resolution? :)
I understand your not liking icons, but I'm not just making a bunch of random icons for each menu item. I have one menu in which users can add smileys to their document, but instead of just having a list of smiley names (angry, happy, big grin, etc.) I think that would be an appropriate place to actually show the icon of the image they are inserting into their document.
Thanks for all your help, guys!
Actually, I was wondering myself on how to make XP-style menus/toolbars/etc.
I don't know about menus but there is a button activex control that can be changes to a menu item. You can have shadowed picture and all other nice office xp menu effects.Quote:
Originally posted by eiSecure
Actually, I was wondering myself on how to make XP-style menus/toolbars/etc.
Search the NET because I forgot on which website it was.
Wow, stickers.... I'm gonna try that ....
And I'll make 'em so the user can't peal them off! Wow, why didn't Bill Gates think of this?