summaryrefslogtreecommitdiff
path: root/TtfInfo Client/FontView.frm
blob: f62c912ff60779c2c443004f1140e87d51b5dfe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
Begin VB.Form frmFontView 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "FontView"
   ClientHeight    =   4410
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7500
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   4410
   ScaleWidth      =   7500
   StartUpPosition =   3  'Windows Default
   Begin RichTextLib.RichTextBox rtbFontView 
      Height          =   4095
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7215
      _ExtentX        =   12726
      _ExtentY        =   7223
      _Version        =   327680
      ReadOnly        =   -1  'True
      OLEDragMode     =   0
      OLEDropMode     =   0
      TextRTF         =   $"FontView.frx":0000
   End
End
Attribute VB_Name = "frmFontView"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public DisplayFont As TtfInfoLib.FontInfo

Private Sub Form_Load()
On Error GoTo err_Unexpected
    ' Temporarily install the font
    DisplayFont.Install False
    Caption = "FontView - " & DisplayFont.filename
    
    With rtbFontView
        .Text = ""
        
        .SelFontName = "Times"
        .SelFontSize = 20
        .SelText = DisplayFont.Name & vbCrLf
        
        .SelFontSize = 10
        .SelText = "Version: " & DisplayFont.Version & vbCrLf
        
        .SelFontName = DisplayFont.Name
        .SelFontSize = 24
        .SelText = "abcdefghijklmnopqrstuvwxyz" & vbCrLf
        .SelText = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & vbCrLf
        .SelText = "1234567890 !'£$%^&*();':.,"
        
        .SelStart = 0
    End With
    Exit Sub
    
err_Unexpected:
    MsgBox Err.Description
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error GoTo err_Unexpected
    ' Uninstall the font
    ' (This has no effect if the font is permanently installed)
    DisplayFont.Uninstall False
    Exit Sub
    
err_Unexpected:
    MsgBox Err.Description
End Sub