home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / vbpg32 / samples4 / ch04 / fontinfo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-10-13  |  2.8 KB  |  99 lines

  1. VERSION 4.00
  2. Begin VB.Form frmFontInfo 
  3.    Caption         =   "Font Information Viewer"
  4.    ClientHeight    =   4305
  5.    ClientLeft      =   825
  6.    ClientTop       =   1905
  7.    ClientWidth     =   7935
  8.    BeginProperty Font 
  9.       name            =   "MS Sans Serif"
  10.       charset         =   0
  11.       weight          =   700
  12.       size            =   8.25
  13.       underline       =   0   'False
  14.       italic          =   0   'False
  15.       strikethrough   =   0   'False
  16.    EndProperty
  17.    Height          =   4710
  18.    Left            =   765
  19.    LinkTopic       =   "Form1"
  20.    ScaleHeight     =   4305
  21.    ScaleWidth      =   7935
  22.    Top             =   1560
  23.    Width           =   8055
  24.    Begin VB.OptionButton Option1 
  25.       Caption         =   "Show Font Information"
  26.       Height          =   315
  27.       Index           =   1
  28.       Left            =   2580
  29.       TabIndex        =   5
  30.       Top             =   3300
  31.       Width           =   2595
  32.    End
  33.    Begin VB.OptionButton Option1 
  34.       Caption         =   "List Tables"
  35.       Height          =   315
  36.       Index           =   0
  37.       Left            =   2580
  38.       TabIndex        =   4
  39.       Top             =   2940
  40.       Value           =   -1  'True
  41.       Width           =   2595
  42.    End
  43.    Begin VB.ListBox List1 
  44.       Height          =   2565
  45.       Left            =   2580
  46.       TabIndex        =   3
  47.       Top             =   300
  48.       Width           =   4995
  49.    End
  50.    Begin VB.FileListBox File1 
  51.       Height          =   1980
  52.       Left            =   300
  53.       Pattern         =   "*.ttf"
  54.       TabIndex        =   2
  55.       Top             =   1980
  56.       Width           =   2175
  57.    End
  58.    Begin VB.DirListBox Dir1 
  59.       Height          =   1155
  60.       Left            =   300
  61.       TabIndex        =   1
  62.       Top             =   720
  63.       Width           =   2175
  64.    End
  65.    Begin VB.DriveListBox Drive1 
  66.       Height          =   315
  67.       Left            =   300
  68.       TabIndex        =   0
  69.       Top             =   300
  70.       Width           =   2175
  71.    End
  72. Attribute VB_Name = "frmFontInfo"
  73. Attribute VB_Creatable = False
  74. Attribute VB_Exposed = False
  75. Option Explicit
  76. Dim CurrentOption%
  77. Private Sub Dir1_Change()
  78.     file1.Path = Dir1.Path
  79. End Sub
  80. Private Sub Drive1_Change()
  81.     Dir1.Path = Drive1.Drive
  82. End Sub
  83. Private Sub file1_Click()
  84.     LoadFontInfo file1.Path & "\" & file1.filename, list1, CurrentOption
  85. End Sub
  86. Private Sub Form_Load()
  87.     Dim d$, r&
  88.     d$ = String$(255, 0)
  89.     r& = GetWindowsDirectory(d$, 254)
  90.     d$ = Left$(d$, r)
  91.     If GetVersion() > 0 Then d$ = d$ & "\system" Else d$ = d$ & "\fonts"
  92.     Dir1.Path = d$
  93.     file1.ListIndex = 0
  94. End Sub
  95. Private Sub Option1_Click(Index As Integer)
  96.     CurrentOption% = Index
  97.     file1_Click
  98. End Sub
  99.