> Absolutely no third party controls are being used. I have seen the problem
> occur with the .NET form, combobox and groupbox, always from the DrawString
[quoted text clipped - 61 lines]
> > > at System.Windows.Forms.GroupBox.OnPaint(PaintEventArgs e)
> > > at
Frank, thanks for your reply first of all. Second, this error is being
thrown outside of any code I have written and can wrap in a try/catch.
Basically there is no way for me to catch this error as it happens after the
last line of my code executes. I have even tried wrapping the entire
controlling method if you will in a try catch. End sub comes and goes and
all is good...but then...bam...there's the red X.
thoughts?
thanks again.
> The red X appears when an exception is thrown and not caught in a Paint
> event or OnPaint function. Essentially, it indicates a programming error --
[quoted text clipped - 104 lines]
> > > > Win32 Version: 1.1.4322.573
> > > > CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> > > > ----------------------------------------
> > > > Extensibility
[quoted text clipped - 7 lines]
> > > > Win32 Version: 1.1.4322.573
> > > > CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
> > > > ----------------------------------------
> > > > System.Windows.Forms
> > > > Assembly Version: 1.0.5000.0
> > > > Win32 Version: 1.1.4322.573
> > > > CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
> > > > ----------------------------------------
> > > > CustomMarshalers
> > > > Assembly Version: 1.0.5000.0
> > > > Win32 Version: 1.1.4322.573
> > > > CodeBase:
file:///c:/windows/assembly/gac/custommarshalers/1.0.5000.0__b03f5f7f11d50a3a/custommarshalers.dll
> > > > ----------------------------------------
> > > > <snip>
[quoted text clipped - 16 lines]
> > > > will be sent to the JIT debugger registered on the machine
> > > > rather than being handled by this dialog.
frank - 03 Mar 2004 22:37 GMT
One of the parameters to DrawString is invalid in the GroupBox OnPaint code,
that is drawing a disabled label. That is all you can tell from the stack
trace. You will need to speak with the code author. If the author is MS, I
suppose you found a bug. Otherwise, all you can do is guess and play until
the problem might disappear. Perhaps change the font on the GroupBox, or
prevent it from becoming disabled.
- Frank
> Frank, thanks for your reply first of all. Second, this error is being
> thrown outside of any code I have written and can wrap in a try/catch.
[quoted text clipped - 97 lines]
> > > > > RectangleF layoutRectangle, StringFormat format)
> > > > > at
System.Windows.Forms.ControlPaint.DrawStringDisabled(Graphics
> > > > > graphics, String s, Font font, Color color, RectangleF
> > layoutRectangle,
[quoted text clipped - 24 lines]
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> > > > > ----------------------------------------
> > > > > Extensibility
[quoted text clipped - 7 lines]
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
> > > > > ----------------------------------------
> > > > > System.Windows.Forms
> > > > > Assembly Version: 1.0.5000.0
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
> > > > > ----------------------------------------
> > > > > CustomMarshalers
> > > > > Assembly Version: 1.0.5000.0
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/custommarshalers/1.0.5000.0__b03f5f7f11d50a3a/custommarshalers.dll
> > > > > ----------------------------------------
> > > > > <snip>
[quoted text clipped - 16 lines]
> > > > > will be sent to the JIT debugger registered on the machine
> > > > > rather than being handled by this dialog.
Hadi - 04 Mar 2004 02:25 GMT
Hello,
Make sure that you do your code change inside the GUI thread. In .Net GUI
thread is separate with the application thread. I used to get this problem
until I marshall all my changes (to the UI) inside the GUI thread. However
you must be careful about which code you process in GUI thread/other threads
as if you put too much processing in GUI thread it would seem that your
application locks up.
The keyword you should look at is the control.Invoke() search it on
MSDN/Doco.
Hadi
> Frank, thanks for your reply first of all. Second, this error is being
> thrown outside of any code I have written and can wrap in a try/catch.
[quoted text clipped - 97 lines]
> > > > > RectangleF layoutRectangle, StringFormat format)
> > > > > at
System.Windows.Forms.ControlPaint.DrawStringDisabled(Graphics
> > > > > graphics, String s, Font font, Color color, RectangleF
> > layoutRectangle,
[quoted text clipped - 24 lines]
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> > > > > ----------------------------------------
> > > > > Extensibility
[quoted text clipped - 7 lines]
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
> > > > > ----------------------------------------
> > > > > System.Windows.Forms
> > > > > Assembly Version: 1.0.5000.0
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
> > > > > ----------------------------------------
> > > > > CustomMarshalers
> > > > > Assembly Version: 1.0.5000.0
> > > > > Win32 Version: 1.1.4322.573
> > > > > CodeBase:
file:///c:/windows/assembly/gac/custommarshalers/1.0.5000.0__b03f5f7f11d50a3a/custommarshalers.dll
> > > > > ----------------------------------------
> > > > > <snip>
[quoted text clipped - 16 lines]
> > > > > will be sent to the JIT debugger registered on the machine
> > > > > rather than being handled by this dialog.