Basically, I want to measure the text size in a TextBox, and I found out that TextRenderer gives me the correct values, while Graphics would give me wrong values. So that seems like TextBox should be using GDI to draw text, right?
However, wherever I read, I see that it's supposed to use GDI+. For example:
- Here http://microsoft.public.dotnet.framework.windowsforms.controls.narkive.com/yoHKjPut/text-rendering-accuracy-problem-in-textbox-richtextbox it says that TextBox and Buttons use GDI+.
- Here Why is Graphics.MeasureString() returning a higher than expected number? it says that default is "compatibility mode" that draws in GDI+
So why is it that I'm getting consistent results with TextRenderer and not with Graphics when it's supposed to be other way around?