,我發現我的問題,每當我把按鈕在我的設計的按鍵下不工作是有辦法,使其在設計按鈕甚至工作? 示例代碼:如何通過按鍵使用按鍵?
If e.KeyValue = Keys.P Then
MsgBox("adadddada")
End If
Private Sub Game_KeyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyValue = Keys.Down Then
If (RArrowDown.Top <= ArrowDown.Top + ArrowDown.Height) And RArrowDown.Visible = True Then offset_1 = RArrowDown.Top - ArrowDown.Top Select Case offset_1 Case -10 To 15 'perfect TimerMain.Enabled = False Hit += 1 Score += 20 RArrowDown.Visible = False Perfect.Visible = True TimerPerfect.Enabled = True GPerfect += 1 Combo_Counter += 1 RandomTime_1.Enabled = True Case 16 To 50 'good TimerMain.Enabled = False Hit += 1 Score += 10 RArrowDown.Visible = False Good.Visible = True TimerGood.Enabled = True GGood += 1 Combo_Counter += 1 RandomTime_1.Enabled = True Case -30 To -11 'good TimerMain.Enabled = False Hit += 1 Score += 10 RArrowDown.Visible = False Good.Visible = True TimerGood.Enabled = True GGood += 1 Combo_Counter += 1 RandomTime_1.Enabled = True End Select End If End If end sub
你可以張貼一些代碼,所以我們可以告訴什麼是捕獲按下按鈕(文本框,表格等)? – LeftyCoder
請展開該代碼段以顯示代碼所在的位置 – Plutonix
@LeftyCoder那樣嗎? –