accessing NumericUpDown's "Value" field through GetNextControl()
Why can't I change the Value field in a NumericUpDown control with something like this using GetNextControl()?
Code:
Dim thing As Object = price1.GetNextControl(Me, False)
thing.Value = 5
where the previous tab control to "price1" is a NumericUpDown control.
I've tried casting it explicitly:
Code:
Dim thing As System.Windows.Forms.NumericUpDown
Dim thing2 As Object = price1.GetNextControl(Me, False)
thing = DirectCast(thing2, System.Windows.Forms.NumericUpDown)
thing.Value = 5
I WANT do this...
Code:
price1.GetNextControl(Me, False).Value = 5
...but there seems to be no "Value" field in System.Windows.Form.Control objects, even though NumericUpDown is a valid control.
can anyone explain how to change a NumericUpDown value when accessing it through GetNextControl()?