Click here to Skip to main content
15,436,489 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi everyone,
I am trying to copy the intellisense of Visual Studio 2008. I have a big text box so called "textBox1" and a comboBox named as "comboBox1". I want that when i press space in my textbox the combobox must appear and when i press any of the arrow keys they must be utilized to iterate the selected items of combobox not for moving cursor up and down in lines of text box. But when combobox is not visible then they must be utilized to move up and down in lines of textbox.

How can i do so can anyone help me?

1 solution

Taken this is Windows Forms, you could utilize for exampleKeyDown[^] event to implement desired functionality.

By using the Handled property of the event arguments, you can choose whether to let navigation keys to move on the lines of the textbox or not.
Share this answer
Sergey Alexandrovich Kryukov 4-Dec-12 18:56pm     CRLF
Right, a 5. --SA
Wendelius 4-Dec-12 23:23pm    
Thanks :)
Akkywadhwa 5-Dec-12 8:47am    
How Can i disable the o let navigation keys to move on the lines of the textbox????????
Wendelius 6-Dec-12 12:18pm    
You can check which key is pressed based on the information in the event arguments and then set Handled property as needed (depending on the key).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900