Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Use the , AutoCompleteMode, and AutoCompleteSource properties to create a TextBox that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for TextBox controls in which URLs, addresses, file names, or commands will be frequently entered.
The use of the property is optional, but you must set the AutoCompleteSource property to CustomSource in order to use .
The operating system might limit the number of custom strings that it can display at once.
The following code example demonstrates how to use a collection as the auto-complete custom source for a TextBox control. This example does the following: