INFO: nDiamonds is Numeric Up Down control
From the Sub 'item1_CheckedChanged', I want to pass the object 'item1' (Check Box) to the arguments of the Sub 'nDiamonds_ValueChanged' but if I add additional parameter to the Sub I get an error regarding unmatched signature.
How can I do that ?
PHP Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
nDiamonds_ValueChanged(sender, e)
End Sub
Private Sub item1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles item1.CheckedChanged
If item1.Checked = True Then
nDiamonds.Value = nDiamonds.Value - 1
Else
nDiamonds.Value = nDiamonds.Value + 1
End If
nDiamonds_ValueChanged(sender, e)
End Sub
Private Sub nDiamonds_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nDiamonds.ValueChanged
If nDiamonds.Value > 0 Then
item1.Enabled = True
item2.Enabled = True
item3.Enabled = True
item4.Enabled = True
Else
item1.Enabled = False
item2.Enabled = False
item3.Enabled = False
item4.Enabled = False
End If
' Wants to add this line:
' o.Enabled = True
' where o is the object parameter that I want to add to this Sub '
End Sub
How can I do that ?