Shortcuts in .Net, Winforms, VB
Here is how to create some shortcuts in .Net, Winforms, VB.
Create a WinForm
Create a new WinForm (with Visual Studio : menu>project>Add new item...>Winform).
In the properties editor, you don't need to set its KeyPreview property to true.
Override the ProcessCmdKey method
In the winform code, override (redefine) the ProcessCmdKey method. Inside, test the second parameter of type Keys to know which keys were pressed. Return true if processed, if not, call the parent method.
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, keyData As Keys) As Boolean If keyData = (Keys.Control Or Keys.C) Then 'do copy something Return True End If Return MyBase.ProcessCmdKey(msg, keyData) End Function