M Mike Feb 13, 2004 #1 Is there a way to determine how long (in twips) a given text string in a given font will be on the screen?
Is there a way to determine how long (in twips) a given text string in a given font will be on the screen?
É éric Feb 13, 2004 #2 System.Drawing.Graphics g = Control.CreateGraphics(); int intStringLength = g.MeasureString(string text, System.Drawing.Font font); Regards, éric
System.Drawing.Graphics g = Control.CreateGraphics(); int intStringLength = g.MeasureString(string text, System.Drawing.Font font); Regards, éric
M Mike Feb 16, 2004 #3 What is "Control" in this example? The CreateGraphics() method of the TextBox, Button, and ListBox controls is apparently not supported in the Compact Framework.
What is "Control" in this example? The CreateGraphics() method of the TextBox, Button, and ListBox controls is apparently not supported in the Compact Framework.
É éric Feb 16, 2004 #4 I think the form control supports CreateGraphics To measure a string any control will do. éric
C Chris Tacke, eMVP Feb 16, 2004 #5 Control is the base class that things like TextBox and Button derive from.