Hello!
I have been having trouble saving a button as a variable;
The error is given at line 4, where a method calls the button. After some inspection I realised, that the "Button1" variable was always nothing, no matter wich button I put in the New sub. Does anyone know what could be done?
Regards,
CrazyVB
I have been having trouble saving a button as a variable;
Code:
Private Button1 As Button
Public ReadOnly btn As Button = Button1
Public Overridable Property Goal As Integer
Public ReadOnly Value As Integer = Button1.BackColor.A
Sub New(ByVal button_ As Button, ByVal goal As Integer)
Me.Goal = goal
Button1 = button_
End SubRegards,
CrazyVB