I am developing a Windows Forms application in Visual Basic.NET with Visual Studio 2008.
I am trying to create fonts (last name, font size and styles) at runtime based on user preferences and apply them to shortcuts.
Both for a simpler user interface and for compatibility between several machines requiring the use of the same font, I DO NOT use InstalledFontCollection , but a set of buttons that will install several selected fonts that, as I know, are present on all machines ( fonts like Verdana).
So, I have to make Public Sub on a module that will create fonts, but I don't know how to encode it. There are also four CheckBoxes that set styles, Bold, Italic, Underline, and Strikeout.
How do I encode this? The SomeLabel.Font.Bold property is read-only, and there seems to be a problem converting a string like Times New Roman to FontFamily. (He just says he can't do it)
How on
Dim NewFontFamily As FontFamily = "Times New Roman"
Thanks in advance.
source
share