PRESENTACION:
NOMBRE: Diana Mendoza Hernández

Grado: 4º

Grupo: B

Especialidad: Informática

Maestra: Margarita Romero Alvarado

Materia: E.S.I.M.L.P
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
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

Precentacion de teclado

  • 1.
    PRESENTACION: NOMBRE: Diana MendozaHernández Grado: 4º Grupo: B Especialidad: Informática Maestra: Margarita Romero Alvarado Materia: E.S.I.M.L.P
  • 2.
    TECLADO DE COLORES Secrearon 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(KeyCodeAs 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