Font Dialog box asks the user to select a particular font installed on your machine.
Code
1. Sub openFontDialog()
2. Dim fd As New FontDialog
3. Dim fnt As Font = Nothing
4. With fd
5. If .ShowDialog = Windows.Forms.DialogResult.OK Then
6. fnt = .Font
7. txt_FontPreview.Font = fnt
8. txt_FontPreview.Text = fnt.FontFamily.Name
9. txt_Bold.Text = fnt.Bold
10. txt_FontFamilyName.Text = fnt.FontFamily.Name
11. txt_Height.Text = fnt.Height
12. txt_IsSystemFont.Text = fnt.IsSystemFont
13. txt_Italic.Text = fnt.Italic
14. txt_Name.Text = fnt.Name
15. txt_Size.Text = fnt.Size
16. txt_Strikeout.Text = fnt.Strikeout
17. txt_Style.Text = fnt.Style
18. txt_Underline.Text = fnt.Underline
19. txt_Unit.Text = fnt.Unit
20. End If
21. End With
22. End Sub
0 comments:
Post a Comment