G
Guest
I am trying to pass a NumericUpDown object into a class method using Visual
Studio 2005, but the control type is
not found in Intellisense and the type declaration is flagged as an error.
Here is a code sample (which doesn't
work):
*** Begin code ***
Imports System.Windows.Forms
Imports System.Net
Public Class ConfigurationClass
Private Sub LoadPortSetting ( byVal newVal as UShort, _
byVal cntrl as NumericUpdown)
cntrl.Value = newVal
End Sub
End Class
*** End code ***
Note that if I change NumericUpdown to ComboBox this code works just fine.
Also, if I pass a form object that
contains a NumericUpdown control into a ConfigurationClass method, I can
access the control and set its Value
property without any problem.
Can anyone tell me what I'm doing wrong? Thanks!
Studio 2005, but the control type is
not found in Intellisense and the type declaration is flagged as an error.
Here is a code sample (which doesn't
work):
*** Begin code ***
Imports System.Windows.Forms
Imports System.Net
Public Class ConfigurationClass
Private Sub LoadPortSetting ( byVal newVal as UShort, _
byVal cntrl as NumericUpdown)
cntrl.Value = newVal
End Sub
End Class
*** End code ***
Note that if I change NumericUpdown to ComboBox this code works just fine.
Also, if I pass a form object that
contains a NumericUpdown control into a ConfigurationClass method, I can
access the control and set its Value
property without any problem.
Can anyone tell me what I'm doing wrong? Thanks!