Look at this sample:
public partial class Form1 : Form
{
private static string myString = null;
private const int MAX_TEXT = 5460;
public Form1()
I think you hit the limitation of the TextRenderer class, which I think is calling the DrawTextEx API function under the hood. If you try to put your builder.ToString()
results into a TextBox, it won't show up either.
If for some reason you need to print a string that long, you would have to revert back to the DrawString method:
e.Graphics.DrawString(myString, this.Font, Brushes.Black, new Point(10, 30));