I have an overriden (WinForms) MemoEdit control (unfortunately I can't give you the code). If I enter more than 32000 characters, it raises an error "A generic error occurred in GDI+" I thought that there's an error (exception) in my control but then I tested on a simple WinForm application this code:
var myString = new string('G', 32001);
var g = this.CreateGraphics();
g.MeasureString(myString, Font, 1000);
and it crashes with the same exactly error Does anyone know why this happens or where is specified this constant of 32000 ? I couldn't find anything useful on Google.
This seems to be a new bug which was introduced in Windows 8. I would be curious as to the behaviour in an older version of Windows:
https://connect.microsoft.com/VisualStudio/feedback/details/776722/label-control-throws-an-exception-if-its-text-is-set-to-a-very-long-string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With