Newsgroup: it.comp.lang.visual-basic
Titolo: [?]VBaccellerator icon menu.dll (PIUTTOSTO LUNGO)

Ho scaricato da 
vbaccelerator.com
 il controllo per inserire icone nei menů
di form mdi e mdichild e i relativi esempi e librerie richieste.
Ho inserito il tutto in un mio progetto esistente (VB5 SP3).
Il problema č che anche copiando il codice dall'esempio fornito con il
controllo, ma funziona soltanto nel form mdi, nei form mdichild non c'č
verso di visualizzare icone nei menů.
Ho anche notato che l'esempio allegato al controllo, composto da un form mdi
e un mdichild, inchioda vb se lancio l'esecuzione con la prop windowstate
dei due form impostata a maximized.
qualcuno ha notizie in merito a questo controllo.
Grazie e un saluto al NG
Valli
Eccovi il codice dell'esempio allegato al ontrollo
MDIFORM
Option Explicit
' This demonstration app demonstrates how to use the
' cPopMenu control to support MDI projects where the
' child forms have their own menus.
'Public Sub NewWindow()
 '  Dim f As frmChildMenu
  ' Set f = New frmChildMenu
'   f.Show
'End Sub
Public Sub EndApp()
Dim frm As Form
   ' Unload all forms:
   For Each frm In Forms
      If (frm.Name = "frmChildMenu") Then
         Unload frm
      End If
   Next frm
   ' Unload me:
   Unload Me
End Sub
Private Sub ctlPopMenu_NewMDIMenu()
   ' Whenever you load a form with its own
   ' menu, this method will be called.  Here
   ' you pass the call onto the form that has
   ' just been loaded so it can populate
   ' the icons:
   If Not Me.ActiveForm Is Nothing Then
      Me.ActiveForm.InitMenu
   End If
End Sub
Private Sub MDIForm_Load()
   ' Set up the MDI forms' menu:
   With ctlPopMenu
      .SubClassMenu Me
      .ImageList = ilsIcons
      .ItemIcon("mnuFile(0)") = 41
      .ItemIcon("mnuHelp(0)") = 26
   End With
End Sub
Private Sub mnuFile_Click(Index As Integer)
   Select Case Index
   Case 0
      frmChildMenu.Show
   Case 2
      Unload Me
   End Select
End Sub
MDICHILD
Option Explicit
Public Sub InitMenu()
Dim lParent As Long
Dim i As Long
   ' This method is called by the MDI form when it
   ' detects a new menu.  This is your opportunity
   ' to tell the PopMenu to find the new menu items
   ' and to add the icons to it.
   With mfrmMain.ctlPopMenu
      ' Inform the pop menu control that
      ' the menu has changed:
      .SubClassMenu Me
      ' Set up the icons.
      .ItemIcon("mnuFile(0)") = 41
      .ItemIcon("mnuFile(1)") = 43
      .ItemIcon("mnuFile(2)") = 61
      .ItemIcon("mnuFile(6)") = 53
      .ItemIcon("mnuFile(7)") = 19
      .ItemIcon("mnuFile(9)") = 55
      .ItemIcon("mnuEdit(0)") = 70
      .ItemIcon("mnuEdit(3)") = 10
      .ItemIcon("mnuEdit(4)") = 9
      .ItemIcon("mnuEdit(5)") = 48
      .ItemIcon("mnuEdit(6)") = 13
      .ItemIcon("mnuEdit(9)") = 3
      .ItemIcon("mnuEdit(10)") = 17
      .ItemIcon("mnuHelp(0)") = 26
      ' Add a new sub menu for testing
      ' purposes:
      lParent = .MenuIndex("mnuTest(0)")
      For i = 1 To 10
         .AddItem "Test" & i, "NewMenu" & i, , , lParent, Rnd *
mfrmMain.ilsIcons.ListImages.Count
      Next i
   End With
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
   ' If you create any new popup menus in this
   ' form, you must call this method to clear
   ' them up.  Otherwise there will be a memory
   ' leak (until the app is closed) and it is possible
   ' but unlikely you will ultimately run out of
   ' menu handles.
   mfrmMain.ctlPopMenu.UnsubclassMenu
End Sub
Private Sub mnuFile_Click(Index As Integer)
   Select Case Index
   Case 0
      ' New
      mfrmMain.NewWindow
   Case 4
      ' close
      Unload Me
   Case 11
      mfrmMain.EndApp
   End Select
End Sub

Riposto il msg perchč non vedo il primo.


Ho scaricato un paio di programmi inerenti all'oggetto, ma tutti mi dicono
"Impossibile creare il componente OCX"
cosa devo scaricare?
bye Roberto

Scusa era Err 429: "Il componente ActiveX non può creare l'oggetto.
bye Roberto

 wrote in message 8rskhh$hon$1...@nslave2.tin.it...
