|
-
Jan 20th, 2006, 02:14 AM
#1
Thread Starter
Addicted Member
[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.
-
Jan 20th, 2006, 02:37 AM
#2
Fanatic Member
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...
-
Jan 20th, 2006, 02:46 AM
#3
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.
-
Jan 20th, 2006, 02:52 AM
#4
Fanatic Member
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...
-
Jan 20th, 2006, 02:56 AM
#5
Fanatic Member
Re: How to Add Icons Submenu in Menueditor
-
Jan 20th, 2006, 03:08 AM
#6
Thread Starter
Addicted Member
Re: How to Add Icons Submenu in Menueditor
-
Jan 20th, 2006, 03:23 AM
#7
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
-
Jan 20th, 2006, 03:32 AM
#8
Re: How to Add Icons Submenu in Menueditor
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
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
-
Jan 20th, 2006, 04:08 AM
#9
Fanatic Member
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...
-
Jan 20th, 2006, 04:09 AM
#10
Fanatic Member
Re: How to Add Icons Submenu in Menueditor
hSubMenu = GetSubMenu(hMenu, 0)
is 0 index value of the submenu????
-
Jan 20th, 2006, 04:41 AM
#11
Lively Member
Re: How to Add Icons Submenu in Menueditor
you can also try menucreator... just search it over the net..
-
Jan 20th, 2006, 07:57 AM
#12
Re: How to Add Icons Submenu in Menueditor
 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:
File
...Open 'Position is 0
...Save 'Position is 1
then 0 assigns image to Open, and if you use 1, then it will create icon for Save.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|