Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0 C#3.0 VS2008 C# C#4.0
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?
Posted 4-Dec-12 8:13am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Sergey Alexandrovich Kryukov at 4-Dec-12 18:56pm
Right, a 5.
Mika Wendelius at 4-Dec-12 23:23pm
Thanks :)
Akkywadhwa at 5-Dec-12 8:47am
How Can i disable the o let navigation keys to move on the lines of the textbox????????
Mika Wendelius at 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)

  Print Answers RSS
0 OriginalGriff 645
1 Maciej Los 225
2 Abhinav S 171
3 Richard Deeming 160
4 Suvendu Shekhar Giri 159
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 9,135
2 Peter Leow 5,042
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,581

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100