|
-
Aug 16th, 2000, 07:35 AM
#1
Thread Starter
New Member
Menu bar Icon
Hi
I'm trying to put an incon on my Menu and i couldn't do it, like MIcrosoft Word. So if you can help me , i apriciate
thanks
-
Aug 16th, 2000, 07:54 AM
#2
Read this article.
Good luck!
-
Aug 16th, 2000, 07:58 AM
#3
Fanatic Member
I've made a really good app to do this really well.
I'm e-mailing it to you now...
-
Aug 16th, 2000, 08:25 AM
#4
Use the SetMenuItemBitmaps API. For this example, add a PictureBox, CommandButton and a Menu with SubMenus.
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
-
Aug 16th, 2000, 08:47 AM
#5
Fanatic Member
Check out this and follow the link for Menu Icons.
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Aug 16th, 2000, 08:54 AM
#6
Addicted Member
to V(ery) Basic
can you email me this program too?
[email protected]
i'm searching for an app, that can do this.
thanx
aj
-
Aug 16th, 2000, 09:01 AM
#7
Fanatic Member
Sure
*warm fuzzy feeling*
-
Aug 16th, 2000, 09:22 AM
#8
V(ery):
if its not to much trouble, could you send it to me ([email protected]) too?
-
Aug 16th, 2000, 09:27 AM
#9
V(ery) Basic
Can you send it to me too?
My e-mail is in my signature.
-
Aug 16th, 2000, 03:32 PM
#10
Fanatic Member
Parksie: I think that SetMenuItemBitmaps is a bit of a waste of time. When it inverts it looks horrible and it isn't at all like MS Office apps (I thought I'd start with a nice cheery compliment)
For all those people desperate enough to have my app lazing around on their HDD:
Just to explain the argumants of .AddMenuItem:
amString: The string name of the MenuItem you would like to add (not used for separator)
amItemType As MenuType: Use mtBitmap for String & Bitmap
Use mtString for String only
Use mtSeparator for a separator
mtCheckmark ain't coded yet (expected within a week)
amParam: If mtBitmap is set then this is the ListImages index of the Icon.
If mtCheckmark is set (this is to be coded) it is the ListImages index of an unhighlighted checkmark and it is assumed that the proveded ListImages index + 1 is the Listimages index of a highlighted checkmark. (To be coded within a week)
amNewMenu: If this is the beginning of a new menu (first item of a menu)
I'll send the update to everybody when it's done.
Once again, thank you for asking me for my virus <ahem> code. 
-
Aug 16th, 2000, 06:28 PM
#11
Addicted Member
More shameless begging!
Sorry to ba annoying V(ery) Basic, but could you please mail your app to me too!
Many thanks,
Steve.
Address follows:
Sent by: Steve Barker
E-mail: [email protected]
P.S. I KNOW 1 is not a prime!
See this thread: http://forums.vb-world.net/showthread.php?threadid=26485
-
Aug 17th, 2000, 05:47 AM
#12
Fanatic Member
With all the attention I'm getting over this I feel like I've actually done something useful.
<looks at code one more time>
Nah.
-
Aug 17th, 2000, 05:51 AM
#13
Fanatic Member
V(ery), it's time for you to create a website!
-
Aug 17th, 2000, 06:42 AM
#14
By the way, 1 is not a prime.
-
Aug 17th, 2000, 11:13 AM
#15
Fanatic Member
Originally posted by oetje
V(ery), it's time for you to create a website!
What's a website?
-
Aug 17th, 2000, 01:45 PM
#16
Addicted Member
I know 1 is not a prime number!
See the following thread for more details:
http://forums.vb-world.net/showthrea...threadid=26485
Cheers,
Steve.
Sent by: Steve Barker
E-mail: [email protected]
P.S. I KNOW 1 is not a prime!
See this thread: http://forums.vb-world.net/showthread.php?threadid=26485
-
Aug 17th, 2000, 01:48 PM
#17
Monday Morning Lunatic
I give in!!!
Okay...V(ery), can I have that code too, please?
[email protected]
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 18th, 2000, 06:33 AM
#18
Fanatic Member
I'd be willing to share my information with fellow low-lifes. 
The insult is to me what a nice long pee-pee is to you.(getting dirty stuff out of your system in one satisfying go)
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
|