thermalman
Technical User
Hi,I have a program that checks whether a Keyboard key is pressed and reports that it has been pressed in a listbox and also changes a Command button's backcolor when each key is pressed. When I have tested the whole keyboard i have a Clear button that resets the backcolor back to default.
The program was originally written in VB6 and now i want to convert it to VB.Net (I am using Visual Studio 2008)
Here is the original code
Dim C As ControlFor Each C In Me.Controls
If TypeOf C Is CommandButton Then C.BackColor = vbButtonFace
Next C
I know that in .net a command button is just called button but how can i set the button backcolor back to default using .Net?
Many Thanks
The program was originally written in VB6 and now i want to convert it to VB.Net (I am using Visual Studio 2008)
Here is the original code
Dim C As ControlFor Each C In Me.Controls
If TypeOf C Is CommandButton Then C.BackColor = vbButtonFace
Next C
I know that in .net a command button is just called button but how can i set the button backcolor back to default using .Net?
Many Thanks