through terminal server. We have yet to see it in any other instance and it
is totally random and sporadic. A solution to this issue would be greatly
welcomed here too.
"Paul Lo" <paul.lo@cyberwisdom.net> wrote in message
news:exja%23K8jEHA.2652@TK2MSFTNGP15.phx.gbl...
> Hi Sadha,
>
> Thanks for your reply. Actually I have both types of scrollbar that you
> mentioned. I have a scrollbar control that is attached to a customer
> control
> that I made. And Yes, I have the scroll event attached to this scrollbar
> control. Besides, I am also using MDI, the mdi child got a scrollbar when
> it
> is displayed inside the mdi parent form. Both of these scrollbars got the
> same problem, occasionally. That really made me frustrated.
>
> If there is some object that I forgot to initialize or dereferenced, guess
> the error should happen every time, but it's not the case. It seems
> strange
> to me that such exception is generated from
> System.Windows.Forms.UnsafeNativeMethods.CallWindowProc, and in fact
> everything in the call stack are internal method calls within the
> framework.
>
> Hope the above could give you some clue to my problem..
>
> Paul
>
>
>
> "mavisahdas" <mavisahdas@discussions.microsoft.com> wrote in message
> news:0E755710-9D6F-4686-AC52-49E5F2916DB0@microsoft.com...
>> Hi paul,
>> Before answering this question... i want to know the following things
>>
>> So you have a scroll bar control in ur application was is a scroll bar
>> attached to some other control.
>>
>> Have u handled any event i mean do u have any Scroll event attached to
> that
>> scroll bar.
>>
>> This null reference exception will occur only when the object is not
>> initialised or only when it is dereferenced. So, there are cases where
>> the
>> objects get disposed... if you have any code written in the scroll event,
> pls
>> send me that code also.
>>
>> Answer these question this will help me solving this problem.. you can
> reach
>> me at sadhasivam1981@yahoo.com, sadhasivam1981@hotmail.com.
>>
>> With regards,
>>
>> Sadha Sivam S,
>> Microsoft Community Star,
>> KMG Info Tech.
>> Vist
http://www.dotnetspider.com for more dot net updates
>>
>>
>>
>> "Paul Lo" wrote:
>>
>> > Dear all,
>> >
>> > I'm writting a .net winForm application with C#, but I'm getting the
>> > following exception when the user scrolls a scrollbar. The strange
>> > thing
> is
>> > that the exception happens only some of the time, and seems pretty
> random.
>> > However, once an exception occurs with a scrollbar and when I choose
>> > 'continue', that particular scrollbar will raise the exception
>> > everytime
> I
>> > click on it from that point on.
>> >
>> > Anyone encounter the same problem before? Any solution to this
> problem?
>> > At the very least I wanna know how I could catch that exception..
>> >
>> > Thanks~!
>> > Paul
>> >
>> >
>> > ************** Exception Text **************
>> > System.NullReferenceException: Object reference not set to an instance
> of an
>> > object.
>> > at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
>> > wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
>> > at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
>> > at System.Windows.Forms.Control.DefWndProc(Message& m)
>> > at System.Windows.Forms.Control.WndProc(Message& m)
>> > at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
>> > at System.Windows.Forms.ContainerControl.WndProc(Message& m)
>> > at System.Windows.Forms.UserControl.WndProc(Message& m)
>> > at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
>> > at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
>> > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
>> > msg,
>> > IntPtr wparam, IntPtr lparam)
>> >
>> >
>> >
>
>