I have a flowlayoutPanel with about 50 userControl added dynamically.
I use this.KeyPreview = true
in the form to be able to catch event in the form.
As it is now I use this eventhandler:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
}
for KeyDown to be able to catch spacebar, the + character and the navigation key pageUp and pageDown. This works good.
I also need to catch the navigation arrowUp and arrowDown but the only working solution for me is to use an event handler for KeyUp like this. When I use event handler Form1_KeyUp event I can use the navigatiobn key arrowUp and arroeDown.
private void Form1_KeyUp(object sender, KeyEventArgs e)
{
}
I tried to use this event handler
private void Form1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
}
but this is never called when I click the navigation arrowUp and arrowDown.
I hope to be able to catch everything such as (pageUp, pageDown, spacebar, + character arrowUp and arrowDown) in the event handler for KeyDown
Any help is welcome.