PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Generic GDI+ error in DrawString
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Generic GDI+ error in DrawString
![]() |
Generic GDI+ error in DrawString |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
I don't know why DrawString is causing this error: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y) at WK.Windows.Forms.WKTabControl.OnDrawItem(DrawItemEventArgs e) at System.Windows.Forms.TabControl.WmReflectDrawItem(Message& m) at System.Windows.Forms.TabControl.WndProc(Message& m) at WK.Windows.Forms.WKTabControl.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) First, this exception had been thrown by GroupBox control, so we decided to buid our own group box control to avoid using DrawString. It worked, but now, it's happing again with TabControl, as you can see... Please, help me. I'm really in trouble. What could I do? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
* =?Utf-8?B?Q2xvZG9hbGRv?= <anonymous@discussions.microsoft.com> scripsit:
> I don't know why DrawString is causing this error: > > System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. > at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) > at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y) > at WK.Windows.Forms.WKTabControl.OnDrawItem(DrawItemEventArgs e) > at System.Windows.Forms.TabControl.WmReflectDrawItem(Message& m) > at System.Windows.Forms.TabControl.WndProc(Message& m) > at WK.Windows.Forms.WKTabControl.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) > > First, this exception had been thrown by GroupBox control, so we decided to buid our own group box control to avoid using DrawString. It worked, but now, it's happing again with TabControl, as you can see... Post your call to 'DrawString'. -- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

