Monday, June 14, 2010

KEYBOARD AND MOUSE EVENTS

Buzz It

AIM: To create a form for showing Keyboard and Mouse events
CODE
Form 1
Private Sub Clear_Click()
Dim i As Integer
message.Caption = ""
For i = 0 To 6
Day(i).Value = False
Next i
End Sub
Private Sub Day_KeyPress(Index As Integer, KeyAscii As Integer)
Dim temp As String, i As Integer
temp = ""
message.Caption = ""
message.Visible = True
If KeyAscii = 13 Then
For i = 0 To 6
If Day(i).Value = True Then temp = Day(i).Caption
Next i
message.Caption = Day(Index).Caption
End If
End Sub
Private Sub Day_MouseMove(Index As Integer, Button As Integer, Shift As
Integer, X As Single, Y As Single)
Dim temp As String, i As Integer
temp = ""
message.Caption = ""
message.Visible = True
For i = 0 To 6
If Day(i).Value = True Then temp = Day(i).Caption
Next i
message.Caption = Day(Index).Caption
End Sub
Private Sub Exit_Click()
End
End Sub




0 comments:

Post a Comment