home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4609
/
strplus
/
keyinfo.frm
< prev
next >
Wrap
Text File
|
1994-07-19
|
6KB
|
222 lines
VERSION 2.00
Begin Form KeyInfo
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "KeyState Information"
ClientHeight = 3165
ClientLeft = 2490
ClientTop = 1680
ClientWidth = 3030
ControlBox = 0 'False
Height = 3570
Left = 2430
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3165
ScaleWidth = 3030
Top = 1335
Width = 3150
Begin Timer Timer1
Interval = 75
Left = 2760
Top = 2640
End
Begin CommandButton Command1
Cancel = -1 'True
Caption = "O &K A Y"
Default = -1 'True
Height = 375
Left = 360
TabIndex = 8
Top = 2520
Width = 2295
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 255
Index = 6
Left = 1800
TabIndex = 7
Top = 2040
Width = 855
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 255
Index = 5
Left = 1800
TabIndex = 14
Top = 1800
Width = 855
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 255
Index = 4
Left = 1800
TabIndex = 13
Top = 1560
Width = 855
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 255
Index = 3
Left = 1800
TabIndex = 12
Top = 1320
Width = 855
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 255
Index = 2
Left = 1800
TabIndex = 11
Top = 840
Width = 855
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 255
Index = 1
Left = 1800
TabIndex = 10
Top = 600
Width = 855
End
Begin Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 255
Index = 0
Left = 1800
TabIndex = 9
Top = 360
Width = 855
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Alternate:"
Height = 255
Index = 6
Left = 360
TabIndex = 6
Top = 2040
Width = 1335
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Control:"
Height = 255
Index = 5
Left = 360
TabIndex = 5
Top = 1800
Width = 1335
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Left Shift:"
Height = 255
Index = 4
Left = 360
TabIndex = 4
Top = 1560
Width = 1335
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Right Shift:"
Height = 255
Index = 3
Left = 360
TabIndex = 3
Top = 1320
Width = 1335
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Caps Lock"
Height = 255
Index = 2
Left = 360
TabIndex = 2
Top = 840
Width = 1335
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Num Lock:"
Height = 255
Index = 1
Left = 360
TabIndex = 1
Top = 600
Width = 1335
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Scroll Lock:"
Height = 255
Index = 0
Left = 360
TabIndex = 0
Top = 360
Width = 1335
End
End
Sub Command1_Click ()
Unload Me
End Sub
Sub Form_Load ()
FormCenterForm Me, DemoMain
For x = 0 To 6: Label2(x).Caption = "": Next x
Screen.MousePointer = 0
End Sub
Sub Form_Paint ()
DoForm3D Me, sunken, 1, 5
End Sub
Sub Timer1_Timer ()
d% = GetStateOfKey("ScrollLock")
GoSub GetWord: Label2(0).Caption = Word$
d% = GetStateOfKey("NumLock")
GoSub GetWord: Label2(1).Caption = Word$
d% = GetStateOfKey("CapsLock")
GoSub GetWord: Label2(2).Caption = Word$
d% = GetStateOfKey("Rshift")
GoSub GetWord: Label2(3).Caption = Word$
d% = GetStateOfKey("Lshift")
GoSub GetWord: Label2(4).Caption = Word$
d% = GetStateOfKey("Control")
GoSub GetWord: Label2(5).Caption = Word$
d% = GetStateOfKey("Alt")
GoSub GetWord: Label2(6).Caption = Word$
Exit Sub
GetWord:
If d% = False Then
Word$ = "no"
Else Word$ = "yes"
End If
Return
End Sub