This project is intended to demonstrate how to implement the IAutoComplete interface to VB6.
It provides more features than the "SHAutoComplete" API.
For example to determine whether the drop-down list is dropped down or not.
But the most important feature is that you can define custom sources. (by a simple string array)
At design time (IDE) there is only one dependency. (AutoCompleteGuids.tlb)
But for the compiled .exe there are no dependencies, because the .tlb gets then compiled into the executable.
Notes:
- There is no way to uninitialize the autocomplete object. You can only disable it. Setting the autocomplete object to nothing has therefore no effect and is not recommended. Anyhow, the autocomplete object will be automatically uninitialized when the TextBox (or any other edit control) receives the WM_DESTROY message.
- Use modeless forms to enable the user to use the mouse on the drop-down suggest list as else only keyboard inputs will work on modal forms.
List of revisions:
Code:23-Feb-2026 - Included enum AutoCompleteOptionRightToLeft. 16-Apr-2025 - Ready for 64-bit. - Modified AutoCompleteGuids.tlb. (compiled with same uuid) Unregister to old AutoCompleteGuids.tlb is not necessary, just overwrite the file. 06-Nov-2018 - Use of lightweight COM object IEnumString in AutoCompleteHandle.bas. - Modified AutoCompleteGuids.tlb. (compiled with same uuid) Unregister to old AutoCompleteGuids.tlb is not necessary, just overwrite the file. 29-Dec-2013 - Enhancement of the Disable and Enable method. 13-Aug-2013 - Fixed a bug that the application will crash when there is an empty string in the custom source. 12-Aug-2013 - First release.




Reply With Quote