Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

Fill Combo Box as text is being entered in a Text Box

I have a Text box and a Combo Box on a form.  When the user enters any part of a last name, the combo box gets populated. I want to change this to as the user enters each character in the Text Box, the combo box gets populated as each character is entered in the text box.  I've used the Keypress event but doesn't do what I want.
0
RFGNaper
Asked:
RFGNaper
1 Solution
 
MsShadowCommented:
You need to use the Key_Down event:

void yourtextBox_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.Enter:
                       // your code here

            }
0
 
WelkinMazeCommented:
Hi,
Isn't there some event like onChange or something for example?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now