home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / lookhere / lookhere.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  6.3 KB  |  234 lines

  1. VERSION 2.00
  2. Begin Form LookHere 
  3.    Caption         =   "Lookie Here! Fonts!"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1215
  6.    ClientTop       =   2025
  7.    ClientWidth     =   7830
  8.    Height          =   4710
  9.    Icon            =   LOOKHERE.FRX:0000
  10.    Left            =   1155
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   4020
  15.    ScaleWidth      =   7830
  16.    Top             =   1395
  17.    Width           =   7950
  18.    Begin OptionButton Option2 
  19.       Caption         =   "Partial Character Sets (Caps Only)"
  20.       Height          =   255
  21.       Left            =   360
  22.       TabIndex        =   9
  23.       Top             =   3360
  24.       Width           =   3255
  25.    End
  26.    Begin CommandButton Command2 
  27.       Caption         =   "Exit"
  28.       Height          =   495
  29.       Left            =   5880
  30.       TabIndex        =   5
  31.       Top             =   3120
  32.       Width           =   1215
  33.    End
  34.    Begin CommandButton Command1 
  35.       Caption         =   "Print"
  36.       Height          =   495
  37.       Left            =   4320
  38.       TabIndex        =   4
  39.       Top             =   3120
  40.       Width           =   1215
  41.    End
  42.    Begin OptionButton Option1 
  43.       Caption         =   "Font List (with samples)"
  44.       Height          =   255
  45.       Left            =   360
  46.       TabIndex        =   6
  47.       Top             =   3120
  48.       Value           =   -1  'True
  49.       Width           =   2295
  50.    End
  51.    Begin TextBox Text3 
  52.       Height          =   1455
  53.       Left            =   4080
  54.       TabIndex        =   8
  55.       Text            =   "Text3"
  56.       Top             =   1320
  57.       Width           =   3495
  58.    End
  59.    Begin TextBox Text2 
  60.       Height          =   1455
  61.       Left            =   240
  62.       TabIndex        =   7
  63.       Text            =   "Text2"
  64.       Top             =   1320
  65.       Width           =   3495
  66.    End
  67.    Begin ComboBox Combo4 
  68.       Height          =   300
  69.       Left            =   6480
  70.       TabIndex        =   3
  71.       Text            =   "Combo4"
  72.       Top             =   720
  73.       Width           =   1095
  74.    End
  75.    Begin ComboBox Combo3 
  76.       Height          =   300
  77.       Left            =   4080
  78.       Sorted          =   -1  'True
  79.       TabIndex        =   2
  80.       Text            =   "Combo3"
  81.       Top             =   720
  82.       Width           =   2175
  83.    End
  84.    Begin ComboBox Combo2 
  85.       Height          =   300
  86.       Left            =   2640
  87.       TabIndex        =   1
  88.       Text            =   "Combo2"
  89.       Top             =   720
  90.       Width           =   1095
  91.    End
  92.    Begin ComboBox Combo1 
  93.       Height          =   300
  94.       Left            =   240
  95.       Sorted          =   -1  'True
  96.       TabIndex        =   0
  97.       Text            =   "Combo1"
  98.       Top             =   720
  99.       Width           =   2175
  100.    End
  101.    Begin TextBox Text1 
  102.       Height          =   285
  103.       Left            =   2040
  104.       TabIndex        =   10
  105.       Text            =   "Text1"
  106.       Top             =   240
  107.       Width           =   3735
  108.    End
  109.    Begin Menu File 
  110.       Caption         =   "&File"
  111.       Begin Menu PrntCtl 
  112.          Caption         =   "&Print"
  113.       End
  114.       Begin Menu ExitCtl 
  115.          Caption         =   "E&xit"
  116.       End
  117.    End
  118.    Begin Menu HelpCtl 
  119.       Caption         =   "&Help"
  120.       Begin Menu Reg 
  121.          Caption         =   "&Registration Info"
  122.       End
  123.       Begin Menu AboutLook 
  124.          Caption         =   "&About"
  125.       End
  126.    End
  127. Sub AboutLook_Click ()
  128.        About.Show MODAL
  129. End Sub
  130. Sub Combo1_Click ()
  131.     Jacob$ = Combo1.Text
  132.     Text2.FontName = Jacob$
  133. End Sub
  134. Sub Combo2_Change ()
  135.     Jacob$ = Combo2.Text
  136.     Text2.FontSize = Val(Jacob$)
  137. End Sub
  138. Sub Combo2_Click ()
  139.     Jacob$ = Combo2.Text
  140.     Text2.FontSize = Val(Jacob$)
  141. End Sub
  142. Sub Combo3_Click ()
  143.     Jacob$ = Combo3.Text
  144.     Text3.FontName = Jacob$
  145. End Sub
  146. Sub Combo4_Change ()
  147.     Jacob$ = Combo4.Text
  148.     Text3.FontSize = Val(Jacob$)
  149. End Sub
  150. Sub Combo4_Click ()
  151.     Jacob$ = Combo4.Text
  152.     Text3.FontSize = Val(Jacob$)
  153. End Sub
  154. Sub Command1_Click ()
  155.     If Option1.Value Then
  156.     For I% = 0 To Printer.FontCount - 1
  157.         Printer.FontName = "Arial"
  158.         Printer.FontSize = 12
  159.         Printer.Print Combo1.List(I%); Tab(40);
  160.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  161.         Printer.Print "AaBbCcXxYyZz 12345?!&*,."
  162.     Next I%
  163.     Printer.EndDoc
  164.     ElseIf Option2.Value Then
  165.     For I% = 0 To Printer.FontCount - 1
  166.         Printer.FontName = "Arial"
  167.         Printer.FontSize = 12
  168.         Printer.Print Combo1.List(I%) ' Set font.
  169.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  170.         For J = 65 To 90
  171.         Printer.Print Chr$(J);
  172.         Next J
  173.         Printer.Print
  174.         Printer.Print
  175.     Next I%
  176.     Printer.EndDoc
  177.     End If
  178. End Sub
  179. Sub Command2_Click ()
  180.     End
  181. End Sub
  182. Sub ExitCtl_Click ()
  183.     End
  184. End Sub
  185. Sub Form_Load ()
  186.     Combo1.Text = ""
  187.     Combo2.Text = "10"
  188.     Combo3.Text = ""
  189.     Combo4.Text = "10"
  190.     Text2.Text = "AaBbCcXxYyZz123!?&"
  191.     Text3.Text = "AaBbCcXxYyZz123!?&"
  192.     For I% = 0 To Printer.FontCount - 1
  193.     Combo1.AddItem Printer.Fonts(I%)  ' Print name of font.
  194.     Next I%
  195.     For I% = 6 To 36
  196.     Combo2.AddItem Str$(I%)
  197.     Next I%
  198.     For I% = 0 To Printer.FontCount - 1
  199.     Combo3.AddItem Printer.Fonts(I%)  ' Print name of font.
  200.     Next I%
  201.     Text1.Text = Str$(I%) + " fonts available to choose from."
  202.     For I% = 6 To 36
  203.     Combo4.AddItem Str$(I%)
  204.     Next I%
  205. End Sub
  206. Sub PrntCtl_Click ()
  207.     If Option1.Value Then
  208.     For I% = 0 To Printer.FontCount - 1
  209.         Printer.FontName = "Arial"
  210.         Printer.FontSize = 12
  211.         Printer.Print Combo1.List(I%); Tab(40);
  212.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  213.         Printer.Print "AaBbCcXxYyZz 12345?!&*,."
  214.     Next I%
  215.     Printer.EndDoc
  216.     ElseIf Option2.Value Then
  217.     For I% = 0 To Printer.FontCount - 1
  218.         Printer.FontName = "Arial"
  219.         Printer.FontSize = 12
  220.         Printer.Print Combo1.List(I%) ' Set font.
  221.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  222.         For J = 65 To 90
  223.         Printer.Print Chr$(J);
  224.         Next J
  225.         Printer.Print
  226.         Printer.Print
  227.     Next I%
  228.     Printer.EndDoc
  229.     End If
  230. End Sub
  231. Sub Reg_Click ()
  232.    Money.Show MODAL
  233. End Sub
  234.