Question : Hotkey with C#.

I have 2 textboxs, how can I change mouse cursor to the next textbox with "Left Narrow" button.

Thanks!

Answer : Hotkey with C#.

Apologies the OnKeyPress is not needed.

private void OnKeyDown(object sender, KeyEventArgs e)
       {
           if (sender is TextBox)
           {
               if (e.KeyCode == Keys.Right)
                   SendKeys.Send("{TAB}");
               else if (e.KeyCode == Keys.Left)
                   SendKeys.Send("+{TAB}");
               else
                   base.OnKeyDown(e);
           }
       }


On its own would be enough, I pasted it all by mistake :)
Random Solutions  
 
programming4us programming4us