Question:

C# keydown and Splitcontainers?

by  |  earlier

0 LIKES UnLike

In my program I have a KeyDown event to read input from the keyboard and i also have a splitcontainer. Now heres the problem, i am trying to use the arrow keys in my KeyDown event but my SplitContainer is using them to control the spliter.

I have tried clicking off of the splitcontainer(to remove focus on that control) and locking the splitter but they dont work.

 Tags:

   Report

2 ANSWERS


  1. On your form try setting the KeyPreview property to true.  


  2. You could try stopping the keystroke from ever getting to the splitcontainer. In the splitcontainer's KeyDown event just put e.SuppressKeyPress = true; it should stop the underlying control from receiving the keystroke and stop the split container reacting to it.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.