Click here to Skip to main content
11,925,896 members (61,298 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#2.0 C#3.0 VS2008 C# , +
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.
Right, a 5.
Mika 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????????
Mika 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.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