By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

SystemArgumentException

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.