Hi I am working on an C# Windows App that uses key combination like CTRL+A and CTRL+Z outside the app (running in background).
I tried RegisterHotKeys
tutorials but i have an issue. When pressing CTRL+A only my method is executed and Windows default action is never executed. I want to execute first windows action and only after that action to execute my method for that key.
For example:
CTRL+A
1) Select All
2) My code
Some code below:
private void mainForm_Load(object sender, EventArgs e)
{
ObjectsList = new List<Data>();
thisWindow = FindWindow(null, "myform");
RegisterHotKey(thisWindow, 1, (uint)fsKeyMod.Control, (uint)Keys.A);
}
private enum fsKeyMod
{
Control = 0x0002,
}
protected override void WndProc(ref Message keyPressed)
{
base.WndProc(ref keyPressed);
if (keyPressed.Msg == 0x0312)
{
Console.WriteLine("apasat cv...");
}
}
I need the solution as soon as possible. Thank You!