Ver Mensaje Individual
  #41 (permalink)  
Antiguo 02/06/2004, 02:26
almengar22
 
Fecha de Ingreso: mayo-2004
Ubicación: guipuzcoa
Mensajes: 83
Antigüedad: 20 años, 9 meses
Puntos: 0
Hola!!
asi que sería poner una segunda listbox y poner este codigo el la listbox1:Private Sub List1_Click()
List2.Clear
Dim SubMenu As Long
Dim y As Long
Dim Total As Long
Dim MII As MENUITEMINFO

For y = 0 To List1.ListCount - 1
If List1.Selected(y) = True Then
SubMenu = GetSubMenu(hMenu, y)
End If
Next
Total = GetMenuItemCount(SubMenu)
For y = 0 To Total - 1
'Dim buff As String
'buff = Space(256)
MII.cbSize = Len(MII)
MII.fMask = MIIM_TYPE
MII.fType = MFT_STRING
'GetMenuString SubMenu, y, buff, Len(buff), MF_BYPOSITION
MII.dwTypeData = Space(512)
MII.cch = Len(MII.dwTypeData)
GetMenuItemInfo SubMenu, y, True, MII
List2.AddItem MII.dwTypeData
Next

y en cuanto al boton, no habría que ponerlo?, lo del form_load ya lo hago en el modulo que es cuando se ejecuta la aplicacion(windows media) y se mete el menu en la listbox. Tu que opinas?
Gracias y espero tu respuesta(al final te voy a tener que indemnizar..)