This error occurs erratically at startup. It appears to be all native
code. Does anyone have any idea what the heck could be cauing this?
System.Argument NullException: Value cannot be null.
Parameter name: pen
at System.Drawing. Graphics.DrawLi ne(Pen pen, Int32 x1, Int32 y1,
Int32 x2, Int32 y2)
at dh.OnPaint(Pain tEventArgs e)
at
System.Windows. Forms.Control.P aintWithErrorHa ndling(PaintEve ntArgs e,
Int16 layer, Boolean disposeEventArg s)
at System.Windows. Forms.Control.O nPrint(PaintEve ntArgs e)
at System.Windows. Forms.Control.W mPrintClient(Me ssage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at dh.WndProc(Mess age& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
code. Does anyone have any idea what the heck could be cauing this?
System.Argument NullException: Value cannot be null.
Parameter name: pen
at System.Drawing. Graphics.DrawLi ne(Pen pen, Int32 x1, Int32 y1,
Int32 x2, Int32 y2)
at dh.OnPaint(Pain tEventArgs e)
at
System.Windows. Forms.Control.P aintWithErrorHa ndling(PaintEve ntArgs e,
Int16 layer, Boolean disposeEventArg s)
at System.Windows. Forms.Control.O nPrint(PaintEve ntArgs e)
at System.Windows. Forms.Control.W mPrintClient(Me ssage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at dh.WndProc(Mess age& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
Comment