The size of the string in device units depends on what you are drawing it on, so you need to get a graphics object from the form or control or whatever you are intending to draw on.
Graphics graph = form1.CreateGraphics();
stringSize = graph.MeasureString(S, F);
No comments:
Post a Comment