TextBox autocomplete list open on click

Posted on 2011-10-07
Last Modified: 2012-05-12

I am using Windows Forms. I have a TextBox, with autocomplete enabled. I want to open autocomplete list programmatically - let's say, with a click on a TextBox.
Default behaviour is that autocomplete list opens on some text entered in a TextBox - I need to open it programmatically.

How to do this?

Greetings, Frenky
Question by:AntonioRodrigo
    LVL 83

    Accepted Solution

    LVL 14

    Assisted Solution

    by:nishant joshi
    check properties of textbox
    System.Windows.Forms.AutoCompleteStringCollection st=new System.Windows.Forms.AutoCompleteStringCollection();
                textBox1.AutoCompleteCustomSource = st;

    Open in new window


    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now