Here's the problem, Since .NET doesn't support control arrays..
I have a user-control in a separate library, the with the Event's on a main form on the main project, the event will raise on the form for a single control via
on the form, as you can see, handles wouldn't allow arrays, such as listOf soo only a single usercontrol can raisethe event in this thread? and since they are created on run time you can't preguess how many would ever be loaded, nor what the name types would be.. List(Of UserControl) just wouldn't work in the handles property.
now in the usercontrol library
this code is the only way it works, but is not code to support multi controls.. I need to figure out how i can load the control more then once and still call the same event
I have a user-control in a separate library, the with the Event's on a main form on the main project, the event will raise on the form for a single control via
on the form, as you can see, handles wouldn't allow arrays, such as listOf soo only a single usercontrol can raisethe event in this thread? and since they are created on run time you can't preguess how many would ever be loaded, nor what the name types would be.. List(Of UserControl) just wouldn't work in the handles property.
VB.NET:
Private WithEvents Bot As New BotCore.Core
Private Sub _Connection(ByVal lColor As System.Drawing.Color, ByVal sResult As String) Handles Bot._Connection
AddChat(rtbChat, FormatChat._Talk, lColor, sResult)
End Sub
now in the usercontrol library
VB.NET:
'// Connection Status Login (Optional w/color).
Public Delegate Sub DelegateConnection(ByVal lColor As System.Drawing.Color, ByVal strResult As String)
Public Event _Connection As DelegateConnection
this code is the only way it works, but is not code to support multi controls.. I need to figure out how i can load the control more then once and still call the same event