[vbnet]
controlname.BackColor = Drawing.Color.FromKnownColor(Drawing.KnownColor.Control)
[/vbnet]
[vbnet]
controlname.BackColor = Drawing.Color.FromKnownColor(Drawing.KnownColor.Control)
[/vbnet]
I noticed that my Windows 7 Aero effect was not enabled yesterday after an IT tech had DameWared to my PC to help with an issue I was having. When I went into the Control Panel and “Troubleshoot Aero Effects” option, I received the following error message: “Mirror drivers don’t support Aero effects” and the Troubleshooting dialog was unable to resolve the issue.
To resolve this, open your Device Manager, expand Display Adapters and Disable the “Dameware Development Mirror Driver 64-bit” driver.
Click “Yes” to disable the device.
Click “Yes” to restart your computer.
To stop DameWare from installing/using the MRC Mirror Driver, open DameWare Mini Remote Control, click the View menu, and choose Default Host Properties…
Click on the Mirror Driver tab and UNCHECK the Use MRC’s Mirror Driver if available option.
Make sure your Form’s KeyPreview property is set to True.
[vbnet]
Private Sub frm_Main_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.Control And e.KeyCode = Keys.Enter Then
‘ Do something
End If
End Sub
[/vbnet]
You can also capture when the Alt+Enter keys are pressed at the same time with the following:
[vbnet]
Private Sub frm_Main_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.Alt And e.KeyCode = Keys.Enter Then
‘ Do something
End If
End Sub
[/vbnet]