2. TECLADO DE COLORES
Se crearon 5 commandButton
Se les agrego en la opción Caption las siguientes
letras: Q,W,E,R,T.
Dar doble clic en el primer command, que seria
Q
3. Private Sub cmd1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyQ Then cmd1.BackColor = vbGreen
If KeyCode = vbKeyW Then cmd2.BackColor = vbYellow
If KeyCode = vbKeyE Then cmd3.BackColor = vbOrange
If KeyCode = vbKeyR Then cmd4.BackColor = vbRed
If KeyCode = vbKeyT Then cmd5.BackColor = vbBlue
End Sub
Private Sub cmd1_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyQ Then cmd1.BackColor = vbButtonFace
If KeyCode = vbKeyW Then cmd2.BackColor = vbButtonFace
If KeyCode = vbKeyE Then cmd3.BackColor = vbButtonFace
If KeyCode = vbKeyR Then cmd4.BackColor = vbButtonFace
If KeyCode = vbKeyT Then cmd5.BackColor = vbButtonFace
End Sub
Private Sub Form_Load()
End Sub