all groups > dotnet windows forms > august 2004 >
You're in the

dotnet windows forms

group:

scrollbar problem..


RE: scrollbar problem.. mavisahdas
8/31/2004 4:19:02 AM
dotnet windows forms: 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



[quoted text, click to view]
scrollbar problem.. Paul Lo
8/31/2004 4:57:58 PM
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)

Re: scrollbar problem.. Mavisahdas
8/31/2004 10:41:05 PM
hi paul,

Can u pls send the code of ur scroll event...

With regards,

Sadha Sivam S,
Microsoft Community Star,
KMG Info Tech,
Bangalore,
Re: scrollbar problem.. Paul Lo
9/1/2004 9:26:39 AM
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



[quoted text, click to view]

Re: scrollbar problem.. Charles Collins
9/10/2004 10:28:35 AM
I have an application that is throwing the same error, but only when run
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.
Charles

[quoted text, click to view]

AddThis Social Bookmark Button