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 / samples5 / ch11 / fntview2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-16  |  2.4 KB  |  67 lines

  1. VERSION 5.00
  2. Begin VB.Form frmInfo 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Form2"
  5.    ClientHeight    =   2790
  6.    ClientLeft      =   1365
  7.    ClientTop       =   2895
  8.    ClientWidth     =   5730
  9.    LinkTopic       =   "Form2"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   2790
  14.    ScaleWidth      =   5730
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.TextBox Text1 
  17.       Height          =   1755
  18.       Left            =   420
  19.       MultiLine       =   -1  'True
  20.       TabIndex        =   1
  21.       Text            =   "FNTVIEW2.frx":0000
  22.       Top             =   180
  23.       Width           =   4995
  24.    End
  25.    Begin VB.CommandButton Command1 
  26.       Caption         =   "Ok"
  27.       Height          =   435
  28.       Left            =   2460
  29.       TabIndex        =   0
  30.       Top             =   2280
  31.       Width           =   975
  32.    End
  33. Attribute VB_Name = "frmInfo"
  34. Attribute VB_GlobalNameSpace = False
  35. Attribute VB_Creatable = False
  36. Attribute VB_PredeclaredId = True
  37. Attribute VB_Exposed = False
  38. Option Explicit
  39. ' Copyright 
  40.  1997 by Desaware Inc. All Rights Reserved.
  41. Private Sub Command1_Click()
  42.     Unload Me
  43. End Sub
  44. Private Sub Form_Load()
  45.    Dim oldfont&
  46.    Dim info&
  47.    Dim t$
  48.    Caption = Form1!FontList.Text
  49.    oldfont& = SelectObject(hdc, FontToUse)
  50.    info = GetFontLanguageInfo(hdc)
  51.    ' Restore the original font
  52.    Call SelectObject(hdc, oldfont&)
  53.     If info = 0 Then
  54.         Text1.Text = "Standard Latin Font"
  55.     Else
  56.         If (info And GCP_DBCS) <> 0 Then t$ = t$ & "Double Byte Character Set" & vbCrLf
  57.         If (info And GCP_DIACRITIC) <> 0 Then t$ = t$ & "Contains diacritic characters" & vbCrLf
  58.         If (info And FLI_GLYPHS) <> 0 Then t$ = t$ & "Font contains non-displaying glyphs" & vbCrLf
  59.         If (info And GCP_GLYPHSHAPE) <> 0 Then t$ = t$ & "Font contains special glyph shapes" & vbCrLf
  60.         If (info And GCP_KASHIDA) <> 0 Then t$ = t$ & "Font supports Kashida glyphs" & vbCrLf
  61.         If (info And GCP_LIGATE) <> 0 Then t$ = t$ & "Font supports Kashida" & vbCrLf
  62.         If (info And GCP_USEKERNING) <> 0 Then t$ = t$ & "Font contains kerning tables" & vbCrLf
  63.         If (info And GCP_REORDER) <> 0 Then t$ = t$ & "Characters need to be reordered for this font" & vbCrLf
  64.         Text1.Text = t$
  65.     End If
  66. End Sub
  67.