Funny Vb.net Error

Started by
-1 comments, last by bzroom 18 years, 5 months ago
I have this fairly complex vb.net program I've been working on. It has 3 tab page controls, 2 nested inside the first. Almost every tabpage has a data grid or two and sometimes these data grids share the same data source. Sometimes I'll just be testing the program and switch to this specific tab page and it will throw an.. An unhandled exception of type 'System.NullReferenceException' occurred in System.Windows.Forms.dll Additional information: Object reference not set to an instance of an object But when I look at the code to see where it's saying this happend it only highlights the "form1" in Public Class Form1 in a green highlight. Usualy it highlights the code that threw the exception. I thought I knew where the problem was but when I put a catch statement there I still get the exception. How can I figure out exactly where the problem is coming from? Heres the top portion of my call stack System.Windows.Forms.dll!System.Windows.Forms.DataGrid.OnPaint(System.Windows.Forms.PaintEventArgs pe) + 0x25f bytes System.Windows.Forms.dll!System.Windows.Forms.Control.PaintWithErrorHandling(System.Windows.Forms.PaintEventArgs e = {ClipRectangle = {X=0,Y=0,Width=728,Height=288}}, short layer, bool disposeEventArgs = false) + 0x5b bytes It looks like the problem lies in my datagrids...

This topic is closed to new replies.

Advertisement