app.UseGDIPlus = True
dim pic as new picture(1,1)
dim pic2 as new picture(1,1)
pic.graphics.TextFont = "SmallSystem"
pic2.graphics.TextFont = "SmallSystem"
for i as integer = 5 to 20
pic2.graphics.textsize = i
if pic.graphics.StringWidth("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") = pic2.graphics.StringWidth("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") then
msgbox "Text Size is "+str(i)
exit
end if
next
This method is for Xojo. See http://forum.xojo.com
SystemFont and SmallSystemFont are size zero in the Inspector. Yet, the displayed font does have a size. This method for Windows finds the font size used by system fonts.
SystemFont and SmallSystemFont are size zero in the Inspector. Yet, the displayed font does have a size. This method for Windows finds the font size used by system fonts.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.