|
-
Sep 13th, 2000, 12:27 AM
#1
Thread Starter
Junior Member
Hi ppl,
Does anyone know how you add icons in the menus like in Microsoft office or any sites that I can go to to get sample code example on how to do this.
Cheers
AD
-
Sep 13th, 2000, 12:41 AM
#2
Fanatic Member
Try:
Code:
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
Const MF_BITMAP = &H4&
Private Sub Command1_Click()
Dim hMenu As Long, hSub As Long, ItemID As Long
hMenu = GetMenu(Me.hwnd)
hSub = GetSubMenu(hMenu, 0)
ItemID = GetMenuItemID(hSub, 0)
SetMenuItemBitmaps hMenu, ItemID, MF_BITMAP, Picture1, Picture1
End Sub
'I'm not sure who's code it is, but i belive i've seen Magatron post it.
You can also search for examples on Planet Source Code
Gl,
D!m
[Edited by Dim on 09-13-2000 at 01:44 AM]
-
Sep 13th, 2000, 12:50 PM
#3
Fanatic Member
(a la Phoebe)
Ooh. Ooh. Ooh
I've made somthing perfect for this, unless you are going to need submenus.
I'll e-mail it to you whether you like it or not ...
-
Sep 13th, 2000, 12:58 PM
#4
New Member
Well. Actually I can't e-mail it to you since you don't seem to have an e-mail 
That's a real pity.
I thought I'd get to send it to somebody else. 
Anyhow, I think that there is something
hyah
But if it is the exaple I think it is, mine is a whole world better.
(Not showing off or anything )
You wouldn't know a joke if it got up and gave you a haircut.
-
Sep 14th, 2000, 11:48 PM
#5
Thread Starter
Junior Member
Thank for the help dudes.
Okay here's my email [email protected] and don't mail me any sick stuff or porn.
I havent been on the net for a few day cause I got the flu and I been taking echinacea before I got sick. What a crock I still got sick that herbal remedy is a fake!!
-
Sep 18th, 2000, 11:39 PM
#6
VBThunder has a very good example for OFFICE-STYLE popup menus that rule. You could use that way, but it really supports only 10x10 graphics.
___________________
Goto: http://www.vbthunder.com/
-
Sep 19th, 2000, 02:43 PM
#7
D!m: Yes I'm pretty sure that was me. I think the bitmap has to be 13x13 in order for it to fit.
-
Sep 24th, 2000, 06:13 AM
#8
Fanatic Member
Well I rule on menus, so I'l send ya that popup menu example 
It supports enablng/disabling boldening, italicising, underlining, submenus and different background colours.
-
Sep 24th, 2000, 07:19 AM
#9
Hyperactive Member
I'd really like your menu demo also .
[email protected] if you would be so kind .
Thanks
[]Private[]
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Sep 24th, 2000, 07:24 PM
#10
vbaccelerator (www.vbaccelerator.com) has an ace dll thng for putting pics menus, and creating them at runtime etc. Well worth a look (like the rest of his site)
- gaffa
-
Sep 24th, 2000, 08:17 PM
#11
Thread Starter
Junior Member
Thanks V(ery) Basic. He's right, he does definitely rule
Having so much fun..
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
|