Yes. Let me explain further my problem, which actually I believe is a
BUG of the numericUpDown control which was already present in version
2003, and the VS team does not *seem* to have done anything about it.
ANYTIME you place any code under the ValueChanged event which take a
little while to execute (I do not mean a very long process [which could
justify for instance a new thread], but something within tens of a
second), if you keep the mouse clicked on one arrow you systematically,
that is ALWAYS get the following error:
----------------------------
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="System.Windows.Forms"
StackTrace:
at
System.Windows.Forms.UpDownBase.UpDownButtons.TimerHandler(Object
source, EventArgs args)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext
context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
at Trial.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
------------------
and there seems anything one can do about it.
That's why I wished to disable the associated timer. Because it causes
an exception I cannot do anything about.
If anyone has suggestion to solve this annoying problem (and I do hope
someone of the VS team is listening) I would like to know.
tommaso