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


Reply With Quote