Results 1 to 18 of 18

Thread: Menu Bar Inco

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    USA, Florida
    Posts
    10

    Cool 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

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Read this article.

    Good luck!

  3. #3
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    I've made a really good app to do this really well.

    I'm e-mailing it to you now...
    Courgettes.

  4. #4
    Guest
    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

  5. #5
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    Check out this and follow the link for Menu Icons.
    VB6 sp5, SQL Server 2000, C#

    There are no stupid questions. Only stupid people.

  6. #6
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146

    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


  7. #7
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    Sure

    *warm fuzzy feeling*

    Courgettes.

  8. #8
    Guest
    V(ery):
    if its not to much trouble, could you send it to me ([email protected]) too?

  9. #9
    Guest

    Talking

    V(ery) Basic
    Can you send it to me too?
    My e-mail is in my signature.

  10. #10
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    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.



    Courgettes.

  11. #11
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197

    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

  12. #12
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    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.
    Courgettes.

  13. #13
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    V(ery), it's time for you to create a website!

  14. #14
    Guest
    By the way, 1 is not a prime.

  15. #15
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    Originally posted by oetje
    V(ery), it's time for you to create a website!
    What's a website?
    Courgettes.

  16. #16
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197

    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

  17. #17
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    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

  18. #18
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Smile

    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)
    Courgettes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width