做成那样的菜单有两种方法(其他的方法实现的效果太次):
一:自画菜单:
我编的自画菜单:http://go6.163.com/910grtd/vb/wdzp/DrawMenu-S.htm(有注释!特地为想学自画菜单的人写的)
http://go6.163.com/910grtd/vb/wdzp/CoolGUI.htm(效果比较好,但没有注释)
http://go6.163.com/910grtd/vb/wdzp/ZXPMenu.htm(XP风格的菜单)
二:用窗体模拟菜单:
http://www.dapha.net/vb/list.asp?id=748
XP下拉菜单(影子效果)http://www.21code.com/codebase/?pos=down&id=1913
源码类型: VisualBasic源码-菜单处理   
上传时间: 2002-02-01  
下载次数: 1336  
源码大小: 46 KB 源码评价:       源码简介:
OFFICE XP风格菜单代码最新版

解决方案 »

  1.   

    不能加的。只能用API函数'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
      

  2.   

    用SetMenuItemBitmaps加的图标只能是 13*13 16色的,而且白色为透明色,即无法显示白色
      

  3.   

    自画菜单
    zyl910(910:分儿,我来了!) (L2002)
    给出了另外可借助第三方控件实现