S
sfauchille
I have several classes (users controls)
Public Cls1
Private _Commande As Boolean
Private _Alarme As Boolean
Private _Type As String
Public Event Type_Changed(ByVal Type As String)
Property Type() As String
...
End Property
Property Commande() As Boolean
...
End Property
Property Alarme() As Boolean
...
End Property
Private Sub UC_Z3_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
...
End Sub
Private Sub CboType_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CboType.SelectedIndexChanged
RaiseEvent Type_Changed(CboType.ValueMember)
End Sub
End Class
The same for cls2 and Cls3
In one form, depending of "something" I want to display the user
control cls1
Public class cls_Main
dim c1
dim c2
private sub cls_Main_Load(...)
if ... then
c1 = New Cls1
elseif ... then
c2 = New Cls2
else
c3 = New Cls3
end if
end sub
end class
Question : How can i get the event of c1, c2 or c3?
sorry for my english
Public Cls1
Private _Commande As Boolean
Private _Alarme As Boolean
Private _Type As String
Public Event Type_Changed(ByVal Type As String)
Property Type() As String
...
End Property
Property Commande() As Boolean
...
End Property
Property Alarme() As Boolean
...
End Property
Private Sub UC_Z3_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
...
End Sub
Private Sub CboType_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CboType.SelectedIndexChanged
RaiseEvent Type_Changed(CboType.ValueMember)
End Sub
End Class
The same for cls2 and Cls3
In one form, depending of "something" I want to display the user
control cls1
Public class cls_Main
dim c1
dim c2
private sub cls_Main_Load(...)
if ... then
c1 = New Cls1
elseif ... then
c2 = New Cls2
else
c3 = New Cls3
end if
end sub
end class
Question : How can i get the event of c1, c2 or c3?
sorry for my english