Generic GDI+ error in DrawString

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
* =?Utf-8?B?Q2xvZG9hbGRv?= said:
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'.
 

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