473,378 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

SystemArgumentException

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(EventAr gs 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(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& 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
Nov 21 '05 #1
1 1259
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

"lgbjr" <lg***@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
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(EventAr gs 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(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& 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

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.