If chkItalic.Checked Then font_style = font_style Or _ If chkBold.Checked Then font_style = font_style Or _ Subroutine ShowSample builds the selected font and assigns it to the sample TextBox.ĭim font_style As FontStyle = FontStyle.Regular TxtSize.TextChanged, chkBold.Click, chkItalic.Click, _ĬhkUnderline.Click, chkStrikeout.Click, _ System.Object, ByVal e As System.EventArgs) Handles _ Private Sub txtSize_TextChanged(ByVal sender As _ ' If something changes, display a new sample. The event handler calls subroutine ShowSample. ![]() The txtSize_TextChanged event handler executes if the user changes the value of the text's size, clicks on one of the check boxes (bold, italic, underline, strikeout), or selects a font from the ListBox. Private Sub Form1_Load(ByVal sender As System.Object, ByVal _Į As System.EventArgs) Handles MyBase.Loadĭim installed_fonts As New InstalledFontCollection ![]() It loops over this object's Families collection and adds the names of the fonts to a ListBox. When the program loads, it creates an InstalledFontCollection object. ![]() NET.įont, bold, underscore, underline, strikeout, strikethru, strikethrough, italic, InstalledFontCollection, installed fonts, VB.NET This example shows how to display samples of fonts in VB. VB Helper: HowTo: Display samples of fonts in VB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |