المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : measure string



C# Programming
06-24-2009, 03:00 PM
hi
how can i measure string height without using Graphics.MeasureString()?
i've tried to use GraphicsPath and AddString() then to GetBounds() but that gives me the exact height, but i need the height like MeasureString() function.
the reason i can't use Graphics is that i need to calculate something about the string height in a function that doesn't get Graphics variable. (in the function that does have the Graphics variable i'm using 300 dpi).