G
Guest
i have 2 forms.. one is windows form and I have a lable there that i do want
to control from class1. I thought I could send a referense to the label but
I don't know how to do that in VB
How do I declare the referens in class2??? I need to change color+text from
class2
Public Class Clas1
Inherits System.Windows.Forms.UserControl
Friend WithEvents lblStatus As System.Windows.Forms.Label
private cl As new Class2
Cl = new Class2(lblStatus)
End class
Public Class Class2
Public Sub New(ByRef instLblText As System.Windows.Forms.Label)
Init()
End Sub
Private Sub Init()
'I need here to give instLblText a green background ans chande it's
color and update the grafic in clas one where the label is shown
End Sub
End class
to control from class1. I thought I could send a referense to the label but
I don't know how to do that in VB
How do I declare the referens in class2??? I need to change color+text from
class2
Public Class Clas1
Inherits System.Windows.Forms.UserControl
Friend WithEvents lblStatus As System.Windows.Forms.Label
private cl As new Class2
Cl = new Class2(lblStatus)
End class
Public Class Class2
Public Sub New(ByRef instLblText As System.Windows.Forms.Label)
Init()
End Sub
Private Sub Init()
'I need here to give instLblText a green background ans chande it's
color and update the grafic in clas one where the label is shown
End Sub
End class