好的,這是我的困境。這裏的這段代碼我:當我進入這個Form1_KeyDown下如何處理VB.NET中的KeyDown
If e.KeyCode = Keys.A Then
TextBox1.AppendText("C, ")
PictureBox2.Visible = True
My.Computer.Audio.Play(My.Resources.C, AudioPlayMode.Background)
End If
現在,Visual Basic中認爲這:
「邀請碼不是AA成員 'System.EventArgs'
現在我已經看過此代碼的工作之前,但它不在這裏。任何幫助?
下面是完整的代碼:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.A Then
TextBox1.AppendText("A, ")
PictureBox2.Visible = True
My.Computer.Audio.Play(My.Resources.C, AudioPlayMode.Background)
End If
If e.KeyCode = Keys.S Then
TextBox1.AppendText("C,")
PictureBox14.Visible = True
My.Computer.Audio.Play(My.Resources.D, AudioPlayMode.Background)
End If
End Sub
您可以包括完整的事件處理方法(包括小組聲明)的代碼? – 2009-07-24 13:56:14