小弟之前的寒假作業...做記憶考驗
等各位下載玩過就知道了...
有人願意幫忙編修程式或提供美美的照片pm小弟喔
Dim X(6), U, D, L, R, W, S, Su, Qu
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 32
S = S + 1
W = 1
U = 0
D = 0
L = 0
R = 0
Case 37
S = S + 1
W = 0
U = 0
D = 0
L = 1
R = 0
Case 38
S = S + 1
W = 0
U = 1
D = 0
L = 0
R = 0
Case 39
S = S + 1
W = 0
U = 0
D = 0
L = 0
R = 1
Case 40
S = S + 1
W = 0
U = 0
D = 1
L = 0
R = 0
End Select
End Sub
Private Sub Form_Load()
Qu = 50
Randomize
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub mnuItem作者_Click()
Load Form2
Form2.Show
End Sub
Private Sub mnuItem玩法_Click()
BUTTON = MsgBox("當按下開始鍵後程式會跑出六組亂數,使用者需依照亂數指示輸入上下左右空白鍵,第一次出現時請使用者記住順序並在消失後開始輸入,第一次等待時間三秒,第二次輸入時間為10秒", vbInformation, "使用訊息")
End Sub
Private Sub mnuopen_Click()
'開始控制
Timer2.Enabled = False
Timer2.Interval = 0
Timer4.Enabled = False
Timer4.Interval = 0
Timer3.Interval = 1
End Sub
Private Sub Timer1_Timer()
If S = 1 Then
If X(0) = "上" And U = 1 Then
Label3 = "上"
ElseIf X(0) = "下" And D = 1 Then
Label3 = "下"
ElseIf X(0) = "左" And L = 1 Then
Label3 = "左"
ElseIf X(0) = "右" And R = 1 Then
Label3 = "右"
ElseIf X(0) = "空白鍵" And W = 1 Then
Label3 = "空白鍵"
Else
Timer2.Enabled = False
Timer2.Interval = 0
Timer4.Enabled = False
Timer4.Interval = 0
BUTTON = MsgBox("錯了錯了唷..呵呵", vbCritical + vbSystemModal, "錯誤訊息")
Timer3.Interval = 100
End If
End If
If S = 2 Then
If X(1) = "上" And U = 1 Then
Label4 = "上"
ElseIf X(1) = "下" And D = 1 Then
Label4 = "下"
ElseIf X(1) = "左" And L = 1 Then
Label4 = "左"
ElseIf X(1) = "右" And R = 1 Then
Label4 = "右"
ElseIf X(1) = "空白鍵" And W = 1 Then
Label4 = "空白鍵"
Else
Timer2.Enabled = False
Timer2.Interval = 0
Timer4.Enabled = False
Timer4.Int ..
訪客只能看到部份內容,免費 加入會員 或由臉書 Google 可以看到全部內容