Hi Martin,
You basically want to
1. Create a method on the form that you want to run when the event on any of
the controls is raised.
2. Use AddHandler to link each of the custom controls to the method created
in 1.
For example, lets say that you have a control called MyCustomControl, and it
has an event called MyEvent, that passes a reference to the MyCustomControl
that raises the event.
Public Class frmTest
' This is the method that the
Sub HandleCustomControlEvents(ByRef oControl As MyCustomControl)
MessageBox.Show(oControl.Name & " fired its event")
End Sub
Private Sub frmTest_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim cntControl As MyCustomControl
cntControl = New MyCustomControl()
AddHandler cntControl.MyEvent, AddressOf HandleCustomControlEvents
Me.Controls.Add(cntControl)
End Sub
End Class
Hope this helps
Rick Hodder