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

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