Shell Programming Using C# (contd) For Creating an AutoCompleteSection
For creating an Autocomplete Section
AutoComplete section deals with creating an application which enables the AutoComplete in ListBox as in Run Command and also in Combo Box as in Browser URL address bar.
The Application here gets the details which details has to be AutoCompleted in the listboxes and also it auto suggests. The AutoSuggest is to suggest you full string when you type partial string.
The AutoComplete gets the following parameters to complete the List Box and the combo box.
-
File System
-
URL History
-
Recent Used
-
Use Tab
-
Sys file
-
Sys Dirs
By checking one or all these parameters it executes the process and autocompletes the listbox .They have AutoSuggest on and off and along with AutoAppend on and off options to enable or disable Auto suggest and Auto Append.
All the above said parameters are being used to Autoappend and Autosuggest in the ListBox.
For Adding the Auto Complete files to the ComboBox the following parameters are added.
Multisources Like History, Recently visited , My Namespace,Custom List are used as the Parameters.
They need to have Autosuggeste and AutoAppend parameters checked and then they can enable to combo box to display the appended and auto suggested information.
The AutoComplete Process uses the following functions
- InterfaceAutoCompleteList
- InterfaceAutoCompleteList2
- InterfaceAutoComplete
- InterfaceAutoComplete2
- InterfaceObjectManager
- ShellAutoComplete.
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("470141A0-5186-11D2-BBB6-0060977B464C")]
public interface InterfaceAutoCompleteList
{
///
/// Sets the current autocomplete options.
///
[PreserveSig]
Int32 SetOptions(
UInt32 dwFlag); // New option flags. Use these flags to ask the client to include the names
// of the files and subfolders of the specified folders the next time the
// client's IEnumString interface is called.
///
/// Retrieves the current autocomplete options.
///
[PreserveSig]
Int32 GetOptions(
out UInt32 pdwFlag); // Pointer to a value that will hold the current option flag when the
// method returns.
}
This figure Shows the Parameters to be checked to AutoComplete the EditBox.
This figure shows the AutoCompleted Result, which shows autocompleted and autosuggested values.

This figure Shows the AutoCompleted Combo Box and the URL details which are shown once they select the combo Box.

Conclusion for Fourth Section
In this section we discussed about the Auto complete Process that can be accomplished using Shell.
