Che esta muy util, lo puse al palo el timer del test con un contador y recive todos los eventos perfectos
, incluso con mas de una instancia tirando palo y palo, digo esta muy util ya que cuando compilamos despues se hace muy dificil llevar un chequeo
una cosita que vi que creo que podes hacer para reducir un vastante el uso de la memoria es ingresar un key del pid al imagelist para no ingresar permanentemente el mismo icono.
Private Sub f_cDebug_DebugString(ByVal lPID As Long, ByVal sPrint As String)
With grdReport
.AddRow
.CellDetails .Rows, 1, .Rows, ALIGNMENT
.CellDetails .Rows, 2, Time, ALIGNMENT
.CellDetails .Rows, 3, lPID, ALIGNMENT
.CellDetails .Rows, 4, ProcessPathByPID(lPID, True), ALIGNMENT
.CellDetails .Rows, 5, sPrint, ALIGNMENT
.CellDetails .Rows, 6, ProcessPathByPID(lPID, False), ALIGNMENT
Dim lIndex As Long
Dim lIcon As Long
If Not f_cImgLst.KeyExists("k" & lPID) Then
If ExtractIconEx(.CellText(.Rows, 6), _
0, 0, lIcon, 1) Then
Call f_cImgLst.AddFromHandle(lIcon, IMAGE_ICON, "k" & lPID)
Call DestroyIcon(lIcon)
lIndex = f_cImgLst.ImageCount - 1
.CellIcon(.Rows, 4) = lIndex
End If
Else
.CellIcon(.Rows, 4) = f_cImgLst.ItemIndex("k" & lPID)
End If
If f_bLock Then
.SelectedRow = .Rows
End If
End With
End Sub
lo que si hay una (o varias) funciones mal en la clase cVBALImageList en el checkeo de las key
Public Property Get ItemIndex(ByVal vKey As Variant) As Long
Dim lR As Long
Dim i As Long
' Returns the 0 based Index for the selected
' Image list item:
If (IsNumeric(vKey)) Then
lR = vKey
If (lR > 0) And (lR <= ImageCount) Then
ItemIndex = lR - 1
Else
' error
Err.Raise 9, App.EXEName & ".vbalImageList"
ItemIndex = -1
End If
Else
lR = -1
For i = 0 To ImageCount - 1
If (m_sKey(i) = vKey) Then
lR = i
Exit For
End If
Next i
If (lR > -1) And (lR <= ImageCount) Then
ItemIndex = lR
Else
Err.Raise 9, App.EXEName & ".vbalImageList"
ItemIndex = -1
End If
End If
End Property
aca en esta funcion se comieron (lR > 0) donde deberia ser (lR > -1) y bueno corrigiendo eso se puede adaptar lo primero.
y esta muy linda la interfaz. Saludos