Results 1 to 3 of 3

Thread: addd icons to the menu

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    30

    Question addd icons to the menu


    hello maybe someone can heelp me .
    i would like to add to my menu icons .
    how can i do it ?

  2. #2
    Matthew Gates
    Guest
    Take a look at this link.
    http://161.58.186.98/tips/tip64.html

  3. #3
    Megatron
    Guest
    VB Code:
    1. Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
    2. Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    3. Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    4. 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
    5. Const MF_BITMAP = &H4&
    6.  
    7. Private Sub Command1_Click()
    8.  
    9.     Dim hMenu As Long, hSub As Long, ItemID As Long
    10.     hMenu = GetMenu(Me.hwnd)
    11.     hSub = GetSubMenu(hMenu, 0)
    12.     ItemID = GetMenuItemID(hSub, 0)
    13.     SetMenuItemBitmaps hMenu, ItemID, MF_BITMAP, Picture1, Picture1
    14.  
    15. End Sub

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