www.21code.com
去找找看,有源代码的

解决方案 »

  1.   

    用API:
    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
      

  2.   

    比如:
    SetMenuItemBitmaps GetMenu(), 1,MF_BYPOSITION, imgMyPic.Picture.Handle,imgMyPic.Picture.Handle这样就可以。
      

  3.   

    : lcooky(今夜无雪) (  ) 信誉:100 
    的办法不好!http://go6.163.com/910grtd/vb/wdzp/DrawMenu-S.zip的比较好!!!
      

  4.   


    如果要简单,用activebar2控件最简单
      

  5.   

    '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
        'URL: [email protected]
        'E-Mail: [email protected]
        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, 0, MF_BYPOSITION, Picture1.Picture, Picture1.Picture
    End Sub
      

  6.   

    To shawls(小山(坚持VB,学Delphi和C#)):贴我的呀!做成那样的菜单有两种方法:
    一:自画菜单:
    我编的自画菜单(有注释!特地为想学自画菜单的人写的):下载:http://go6.163.com/910grtd/vb/wdzp/DrawMenu-S.zip
    界面:http://go6.163.com/910grtd/vb/wdzp/DrawMenu-S.gif二:用窗体模拟菜单:
    http://www.dapha.net/soure/form/XP%20(or%20.NET)%20menu%20with%20sh
    XP下拉菜单(影子效果)