SystemArgumentException

  • Thread starter Thread starter lgbjr
  • Start date Start date
L

lgbjr

Hi All,

I have a VB.NET MDI app that uses some 3rd party controls (CSTSoft) on some
of the MDI child forms. If I remove the control, all works fine. But, with
the control, I get a SystemArgumentException:

System.ArgumentException: Invalid parameter used.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat
format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at CSTPercent.Percent.b()
at CSTPercent.Percent.OnResize(EventArgs e)
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32
width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmMove(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)

I've hunted around on the web and found that exception is actually being
caused by a known bug in the 1.1 framework.

What I'd like to do is catch this exception, but I have no idea where to
catch it. The actual exception occurs when I minimize the MDI child (if I
minimize the MDI parent, there's no exception).

TIA
Lee
 
Hi All,

I'm not having any luck trying to catch this exception. since the exception
occurs when the child form is minimized, I've tried adding a Try..Catch
block to the Resize and SizeChanged events, but that's not working.

If I run the executable outside the IDE, I get the unhandled exception and
if I continue, all works. If I run the app from the IDE, when the exception
occurs, it actually points to the MDI parent form class.

Where and how do I put an exception handler for this?

TIA,
Lee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top