Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If e.KeyCode = Keys.A Then
- TextBox1.AppendText("C, ")
- PictureBox2.Visible = True
- My.Computer.Audio.Play(My.Resources.C, AudioPlayMode.Background)
- End If
- 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
- Private Sub foo_KeyDown(sender As Object, e As KeyEventArgs)
- If e.KeyCode = Keys.A Then
- TextBox1.AppendText("A, ")
- PictureBox2.Visible = True
- My.Computer.Audio.Play(My.Resources.C, AudioPlayMode.Background)
- ElseIf e.KeyCode = Keys.S Then
- TextBox1.AppendText("C,")
- PictureBox14.Visible = True
- My.Computer.Audio.Play(My.Resources.D, AudioPlayMode.Background)
- End If
- End Sub
- Private Sub Form1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)
- // code here
- End Sub
- Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
- MsgBox(e.KeyCode.ToString()) 'Message what the keycode
- If (e.KeyCode = Keys.A) Then
- MsgBox("e.KeyCode = Keys.A") 'Message that I've found the A
- TextBox1.AppendText("C, ")
- PictureBox2.Visible = True
- My.Computer.Audio.Play(My.Resources.C, AudioPlayMode.Background)
- End If
- Private Sub TextBoxKeyTest_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBoxKeyTest.KeyDown
- MsgBox(e.KeyCode.ToString())'Message what the keycode
- If (e.KeyCode = Keys.A) Then
- MsgBox("e.KeyCode = Keys.A")'Message that I've found the A
- TextBox1.AppendText("C, ")
- PictureBox2.Visible = True
- My.Computer.Audio.Play(My.Resources.C, AudioPlayMode.Background)
- End If
- End Sub
Add Comment
Please, Sign In to add comment