thermalman
Technical User
Hi,
I have a keyboard test program that has a listbox and when you press any keyboard key it's hex value is converted to a VK code and shows in the listbox. I have now added a lot of command buttons to represent the different keys on the keyboard but when i try to link say the 2 shift keys i get an error.
here is a copy of the coding
Case &H10: szRetval = "VK_SHIFT": cmdRShift.BackColor = vbGreen
I have tried
Case &H10: szRetval = "VK_SHIFT": cmdRShift & cmdLShift.BackColor = vbGreen
but it errors every time.
I want it so that when I press either of the shift keys both command buttons change color but I am not quite sure how to join the statement so that it sets the color of both cmd buttons at the same time
Can anybody help?
I have a keyboard test program that has a listbox and when you press any keyboard key it's hex value is converted to a VK code and shows in the listbox. I have now added a lot of command buttons to represent the different keys on the keyboard but when i try to link say the 2 shift keys i get an error.
here is a copy of the coding
Case &H10: szRetval = "VK_SHIFT": cmdRShift.BackColor = vbGreen
I have tried
Case &H10: szRetval = "VK_SHIFT": cmdRShift & cmdLShift.BackColor = vbGreen
but it errors every time.
I want it so that when I press either of the shift keys both command buttons change color but I am not quite sure how to join the statement so that it sets the color of both cmd buttons at the same time
Can anybody help?