Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/09/2007, 01:41
artenara
 
Fecha de Ingreso: septiembre-2007
Mensajes: 4
Antigüedad: 16 años, 8 meses
Puntos: 0
Re: Integrar ActiveX DLL en proyecto EXE

Toda la aplicación no te la puedo subir porque ocupa muchísmo además de que es una aplicación de la empresa donde trabajo.

Te pongo el código de el primer class module del que se derivan todas las llamadas a todo el resto de modules, class modules y formularios. A ver qué te parece.




'Implement the IToolBarDef interface
Implements IToolBarDef
Private Property Get IToolBarDef_Caption() As String
' Set the string that appears as the toolbar's title
IToolBarDef_Caption = "RADIOGIS_WSN"
End Property

Private Sub IToolBarDef_GetItemInfo(ByVal pos As Long, ByVal itemDef As IItemDef)
' Define the commands that will be on the toolbar. The 1st command
' will be the custom command MyCustomTool. The 2nd and 3rd commands will
' be the builtin AddData and Save commands.
' ID is the ProgID of the command. Group determines whether the command
' begins a new group on the toolbar
Select Case pos
Case 0
itemDef.ID = "RADIOGIS.CalcularMenu"
itemDef.Group = False
Case 1
itemDef.ID = "RADIOGIS.bdmenu"
itemDef.Group = False

Case 2
itemDef.ID = "RADIOGIS.pantallamenu"
itemDef.Group = False
Case 3
itemDef.ID = "RADIOGIS.WsnMenu"
itemDef.Group = False

Case 4
itemDef.ID = "RADIOGIS.ubicacion"
itemDef.Group = False
Case 5
itemDef.ID = "RADIOGIS.ayudamenu"
itemDef.Group = True
Case 6
itemDef.ID = "RADIOGIS.calcula_cob2"
itemDef.Group = True
Case 7
itemDef.ID = "RADIOGIS.Calcula_sis2"

Case 8
itemDef.ID = "RADIOGIS.Calcula_best2"

Case 9
itemDef.ID = "RADIOGIS.Calcula_den2"
itemDef.Group = True
Case 10
itemDef.ID = "RADIOGIS.Calcula_map2"

Case 11
itemDef.ID = "RADIOGIS.pintar"
itemDef.Group = True
Case 12
itemDef.ID = "RADIOGIS.borra_capas2"
itemDef.Group = True
End Select
End Sub

Private Property Get IToolBarDef_ItemCount() As Long
' Set how many commands will be on the toolbar
IToolBarDef_ItemCount = 13
End Property

Private Property Get IToolBarDef_Name() As String
' Set the internal name of the toolbar.
IToolBarDef_Name = "RADIOGIS_WSN"

A mí sólo se me ha ocurrido crear un menú en el nuevo proyecto e ir asociandole a cada opción su class module correspndiente y agregarle todo el código de la DLL y compilarlo todo como un único proyecto