home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / str_plus / keyinfo.frm < prev    next >
Text File  |  1994-07-19  |  6KB  |  222 lines

  1. VERSION 2.00
  2. Begin Form KeyInfo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "KeyState Information"
  6.    ClientHeight    =   3165
  7.    ClientLeft      =   2490
  8.    ClientTop       =   1680
  9.    ClientWidth     =   3030
  10.    ControlBox      =   0   'False
  11.    Height          =   3570
  12.    Left            =   2430
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3165
  17.    ScaleWidth      =   3030
  18.    Top             =   1335
  19.    Width           =   3150
  20.    Begin Timer Timer1 
  21.       Interval        =   75
  22.       Left            =   2760
  23.       Top             =   2640
  24.    End
  25.    Begin CommandButton Command1 
  26.       Cancel          =   -1  'True
  27.       Caption         =   "O &K A Y"
  28.       Default         =   -1  'True
  29.       Height          =   375
  30.       Left            =   360
  31.       TabIndex        =   8
  32.       Top             =   2520
  33.       Width           =   2295
  34.    End
  35.    Begin Label Label2 
  36.       Alignment       =   1  'Right Justify
  37.       BackStyle       =   0  'Transparent
  38.       Caption         =   "Label2"
  39.       Height          =   255
  40.       Index           =   6
  41.       Left            =   1800
  42.       TabIndex        =   7
  43.       Top             =   2040
  44.       Width           =   855
  45.    End
  46.    Begin Label Label2 
  47.       Alignment       =   1  'Right Justify
  48.       BackStyle       =   0  'Transparent
  49.       Caption         =   "Label2"
  50.       Height          =   255
  51.       Index           =   5
  52.       Left            =   1800
  53.       TabIndex        =   14
  54.       Top             =   1800
  55.       Width           =   855
  56.    End
  57.    Begin Label Label2 
  58.       Alignment       =   1  'Right Justify
  59.       BackStyle       =   0  'Transparent
  60.       Caption         =   "Label2"
  61.       Height          =   255
  62.       Index           =   4
  63.       Left            =   1800
  64.       TabIndex        =   13
  65.       Top             =   1560
  66.       Width           =   855
  67.    End
  68.    Begin Label Label2 
  69.       Alignment       =   1  'Right Justify
  70.       BackStyle       =   0  'Transparent
  71.       Caption         =   "Label2"
  72.       Height          =   255
  73.       Index           =   3
  74.       Left            =   1800
  75.       TabIndex        =   12
  76.       Top             =   1320
  77.       Width           =   855
  78.    End
  79.    Begin Label Label2 
  80.       Alignment       =   1  'Right Justify
  81.       BackStyle       =   0  'Transparent
  82.       Caption         =   "Label2"
  83.       Height          =   255
  84.       Index           =   2
  85.       Left            =   1800
  86.       TabIndex        =   11
  87.       Top             =   840
  88.       Width           =   855
  89.    End
  90.    Begin Label Label2 
  91.       Alignment       =   1  'Right Justify
  92.       BackStyle       =   0  'Transparent
  93.       Caption         =   "Label2"
  94.       Height          =   255
  95.       Index           =   1
  96.       Left            =   1800
  97.       TabIndex        =   10
  98.       Top             =   600
  99.       Width           =   855
  100.    End
  101.    Begin Label Label2 
  102.       Alignment       =   1  'Right Justify
  103.       BackStyle       =   0  'Transparent
  104.       Caption         =   "Label2"
  105.       Height          =   255
  106.       Index           =   0
  107.       Left            =   1800
  108.       TabIndex        =   9
  109.       Top             =   360
  110.       Width           =   855
  111.    End
  112.    Begin Label Label1 
  113.       BackStyle       =   0  'Transparent
  114.       Caption         =   "Alternate:"
  115.       Height          =   255
  116.       Index           =   6
  117.       Left            =   360
  118.       TabIndex        =   6
  119.       Top             =   2040
  120.       Width           =   1335
  121.    End
  122.    Begin Label Label1 
  123.       BackStyle       =   0  'Transparent
  124.       Caption         =   "Control:"
  125.       Height          =   255
  126.       Index           =   5
  127.       Left            =   360
  128.       TabIndex        =   5
  129.       Top             =   1800
  130.       Width           =   1335
  131.    End
  132.    Begin Label Label1 
  133.       BackStyle       =   0  'Transparent
  134.       Caption         =   "Left Shift:"
  135.       Height          =   255
  136.       Index           =   4
  137.       Left            =   360
  138.       TabIndex        =   4
  139.       Top             =   1560
  140.       Width           =   1335
  141.    End
  142.    Begin Label Label1 
  143.       BackStyle       =   0  'Transparent
  144.       Caption         =   "Right Shift:"
  145.       Height          =   255
  146.       Index           =   3
  147.       Left            =   360
  148.       TabIndex        =   3
  149.       Top             =   1320
  150.       Width           =   1335
  151.    End
  152.    Begin Label Label1 
  153.       BackStyle       =   0  'Transparent
  154.       Caption         =   "Caps Lock"
  155.       Height          =   255
  156.       Index           =   2
  157.       Left            =   360
  158.       TabIndex        =   2
  159.       Top             =   840
  160.       Width           =   1335
  161.    End
  162.    Begin Label Label1 
  163.       BackStyle       =   0  'Transparent
  164.       Caption         =   "Num Lock:"
  165.       Height          =   255
  166.       Index           =   1
  167.       Left            =   360
  168.       TabIndex        =   1
  169.       Top             =   600
  170.       Width           =   1335
  171.    End
  172.    Begin Label Label1 
  173.       BackStyle       =   0  'Transparent
  174.       Caption         =   "Scroll Lock:"
  175.       Height          =   255
  176.       Index           =   0
  177.       Left            =   360
  178.       TabIndex        =   0
  179.       Top             =   360
  180.       Width           =   1335
  181.    End
  182. End
  183.  
  184. Sub Command1_Click ()
  185.     Unload Me
  186. End Sub
  187.  
  188. Sub Form_Load ()
  189.     FormCenterForm Me, DemoMain
  190.     For x = 0 To 6: Label2(x).Caption = "": Next x
  191.     Screen.MousePointer = 0
  192. End Sub
  193.  
  194. Sub Form_Paint ()
  195.     DoForm3D Me, sunken, 1, 5
  196. End Sub
  197.  
  198. Sub Timer1_Timer ()
  199.     d% = GetStateOfKey("ScrollLock")
  200.     GoSub GetWord: Label2(0).Caption = Word$
  201.     d% = GetStateOfKey("NumLock")
  202.     GoSub GetWord: Label2(1).Caption = Word$
  203.     d% = GetStateOfKey("CapsLock")
  204.     GoSub GetWord: Label2(2).Caption = Word$
  205.     d% = GetStateOfKey("Rshift")
  206.     GoSub GetWord: Label2(3).Caption = Word$
  207.     d% = GetStateOfKey("Lshift")
  208.     GoSub GetWord: Label2(4).Caption = Word$
  209.     d% = GetStateOfKey("Control")
  210.     GoSub GetWord: Label2(5).Caption = Word$
  211.     d% = GetStateOfKey("Alt")
  212.     GoSub GetWord: Label2(6).Caption = Word$
  213.     Exit Sub
  214. GetWord:
  215.     If d% = False Then
  216.         Word$ = "no"
  217.         Else Word$ = "yes"
  218.         End If
  219.     Return
  220. End Sub
  221.  
  222.