Gracias pero era mas facil ponerlo en Visual BASIC.
Ya he visto que tengo que añadir esta linea: 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
Aqui lo dejo para quien le haga falta alguna vez. Solo hay que hacer el menu en un Form, y añadir unas pictures que son las que usaremos:
Option Explicit
'Esta API crea el Shell del Acerca de con los datos del Ordenador y demas
Private Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hwnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long
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
Const MF_BYPOSITION = &H400&
Private Sub SetMenuIcon()
On Error Resume Next
Dim hMenu As Long
Dim hSubMenu As Long
Dim Ret As Long
'Get main menu ID
hMenu = GetMenu(hwnd)
'MENU FILE - Get sub menu 0 (Archivo - Items)
hSubMenu = GetSubMenu(hMenu, 0)
'set bitmap to menu item, by ordinal
Ret = SetMenuItemBitmaps(hSubMenu, 0, MF_BYPOSITION, iNew.Picture, iNew.Picture)
Ret = SetMenuItemBitmaps(hSubMenu, 1, MF_BYPOSITION, iOpen.Picture, iOpen.Picture)
Ret = SetMenuItemBitmaps(hSubMenu, 2, MF_BYPOSITION, iSave.Picture, iSave.Picture)
'Skip the separator (it's 3)
Ret = SetMenuItemBitmaps(hSubMenu, 4, MF_BYPOSITION, iSave.Picture, iSave.Picture)
'Skip the separator (it's 5)
Ret = SetMenuItemBitmaps(hSubMenu, 6, MF_BYPOSITION, iExit.Picture, iExit.Picture)
' MENU EDIT - Get sub menu 1 (Edicion - Items)
hSubMenu = GetSubMenu(hMenu, 1)
Ret = SetMenuItemBitmaps(hSubMenu, 0, MF_BYPOSITION, iCut.Picture, iCut.Picture)
Ret = SetMenuItemBitmaps(hSubMenu, 1, MF_BYPOSITION, iCopy.Picture, iCopy.Picture)
Ret = SetMenuItemBitmaps(hSubMenu, 2, MF_BYPOSITION, iPaste.Picture, iPaste.Picture)
' MENU EDIT - Get sub menu 2 (Ayuda - Items)
hSubMenu = GetSubMenu(hMenu, 2)
Ret = SetMenuItemBitmaps(hSubMenu, 0, MF_BYPOSITION, iHelp.Picture, iHelp.Picture)
End Sub
Private Sub Form_Load()
On Error Resume Next
Call SetMenuIcon
End Sub
Private Sub menuAbout_Click()
On Error Resume Next
Call ShellAbout(hwnd, App.Title, "Autor:.....", Icon.Handle)
End Sub
__________________ Alguien sabe como es? |