T
tomer
Hi,
I am in process of trying to figure out how to catch all events raised by an
activex control
on a custom form.
In order to catch all events i created an activex control,which contains a
listview
than i exposed single event: Click
My control handle the ListView control events and always raise it's Click
Event
just after it saved some information in a public collection:
Here is the code in the activex dll:
Option Explicit
Public Params As Collection
Public CurrentEvent As String
Public Event Click()
Private Sub ListView_ColumnClick(ByVal ColumnHeader As
MSComctlLib.ColumnHeader)
CurrentEvent = "ColumnClick"
Params.Add ColumnHeader, "ColumnHeader"
RaiseEvent Click
Params.Remove 1
End Sub
Private Sub ListView_ItemClick(ByVal Item As MSComctlLib.ListItem)
CurrentEvent = "ItemClick"
Params.Add Item, "Item"
RaiseEvent Click
Params.Remove 1
End Sub
Private Sub ListView_MouseMove(Button As Integer, Shift As Integer, x As
Single, y As Single)
CurrentEvent = "MouseMove"
Params.Add x, "x"
Params.Add y, "y"
RaiseEvent Click
Params.Remove 1
Params.Remove 1
End Sub
Private Sub UserControl_Initialize()
Set Params = New Collection
End Sub
Private Sub UserControl_Resize()
ListView.Top = 0
ListView.Left = 0
ListView.Width = UserControl.ScaleWidth
ListView.Height = UserControl.ScaleHeight
End Sub
I am in process of trying to figure out how to catch all events raised by an
activex control
on a custom form.
In order to catch all events i created an activex control,which contains a
listview
than i exposed single event: Click
My control handle the ListView control events and always raise it's Click
Event
just after it saved some information in a public collection:
Here is the code in the activex dll:
Option Explicit
Public Params As Collection
Public CurrentEvent As String
Public Event Click()
Private Sub ListView_ColumnClick(ByVal ColumnHeader As
MSComctlLib.ColumnHeader)
CurrentEvent = "ColumnClick"
Params.Add ColumnHeader, "ColumnHeader"
RaiseEvent Click
Params.Remove 1
End Sub
Private Sub ListView_ItemClick(ByVal Item As MSComctlLib.ListItem)
CurrentEvent = "ItemClick"
Params.Add Item, "Item"
RaiseEvent Click
Params.Remove 1
End Sub
Private Sub ListView_MouseMove(Button As Integer, Shift As Integer, x As
Single, y As Single)
CurrentEvent = "MouseMove"
Params.Add x, "x"
Params.Add y, "y"
RaiseEvent Click
Params.Remove 1
Params.Remove 1
End Sub
Private Sub UserControl_Initialize()
Set Params = New Collection
End Sub
Private Sub UserControl_Resize()
ListView.Top = 0
ListView.Left = 0
ListView.Width = UserControl.ScaleWidth
ListView.Height = UserControl.ScaleHeight
End Sub