System.Drawing Error with DataGrid

  • Thread starter Thread starter Chuck Cobb
  • Start date Start date
C

Chuck Cobb

I have an application that uses a VB.Net DLL that is launched from Visio.
It has worked fine with Visio2000 and 2002 for some time, but we've just
begun seeing a problem with Visio 2003. When the application tries to paint
a form that contains a datagrid, we get the following error:
System.ArgumentException: Invalid parameter used

At System.Drawing.Graphics.CheckErrorStatus(Int32 status)

At System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x,
Int32 y, Int32 width, Int32height)

At System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle
rect)

At System.Drawing.Forms.DataGridParentRows.Paint(Graphics g,
Rectangle visualbounds, Boolean alignRight)

At System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)

At
System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int 16
layer, Boolean disposeEventArgs)

At System.Windows.Forms.Control.WmPaint(Message& m)

At System.Windows.Forms.Control.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

I've tried replicating the problem on three other systems with Visio 2003
and have been unable to reproduce the problem...it is only happening on a
customer site. I've seen a similar problem occur when data is changing in
the datagrid control when it is attempting to paint the form, but I'm sure
that is not the case here.

Has anyone seen this problem?

Thanks,


Chuck Cobb
 
I have found the answer to this problem...it turns out to be a problem
running Office 2003 on
Windows 2000. Microsoft has given me a hotfix that solve the problem, but
it is not available
to the general public yet. It seems to be a problem with GDI.

Chuck
 
Back
Top