IE & Delphi News Getting started EmbeddedWB IEAddress Url History IEFavorites APP IECache IE5Tools IESecurity UI-Less Parser HTMLEdit XML Parser IEDownload Toolbox Links

IEAddress

 

 

TIEAddress is a delphi-component that makes it easy to add a address-combobox to your webbrowser application. IEAddress implements autocompletetion and autosuggest.

When autocompletion is turned on and the user begins to type a URL in the editbox, the component appends the remainder of the most likely candidate string to the existing characters, highlighting the appended characters. IEAddress behaves as if the user had entered the entire string manually and then highlighted the appended characters. If the user continues to enter characters, they are added to the existing partial string. If the user adds a character that is identical to the next highlighted character, the highlighting for that character will be turned off. The remaining characters will still be highlighted. If the user adds a character that does not match the next highlighted character, autocompletion will attempt to generate a new candidate string based on the larger partial string. It will append the remainder of the new candidate string to the current partial string, as before. If no candidate string can be found, only the typed characters will appear and the edit box will behave as it would without autocompletion. This process continues until the user accepts a string.

When autosuggest is turned on, autocompletion displays a drop-down list, with one or more suggested complete strings, beneath the edit control. The user can select one of the suggested strings, usually by clicking it with the mouse, or continue typing. As typing progresses, the drop-down list may be modified, based on the current partial string.

 

Drop the component on a form and add a few lines of code:

procedure procedure TForm1.IEAddress1UrlSelected(Url: string);
begin
  embeddedwb1.go(url);
end;

procedure TForm1.EmbeddedWB1BeforeNavigate2(Sender: TObject; const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData, Headers: OleVariant; var Cancel: WordBool);
begin
  if (Targetframename = '') and (url <> ieaddress1.url) then
  ieaddress1.url := Url;
end;

 

Options:

AutoComplete:

acDefault: Use the default settings from registry. The user can change these settings manually by launching the Internet Options property sheet from the Tools menu and clicking the Advanced tab.

acForceOn: Ignore the registry default and force the autocomplete feature on. The completed string will be displayed in the edit box with the added characters highlighted.

acForceOff: Ignore the registry default and force the autocomplete feature off.

AutoSuggest:

asDefault: Use the default settings from registry. The user can change these settings manually by launching the Internet Options property sheet from the Tools menu and clicking the Advanced tab.

asForceOn: Ignore the registry default and force the autosuggest feature on.

asForceOff: Ignore the registry default and force the autosuggest feature off.

FileOptions: specify which files or URLs will be available for autocomplete or autosuggest operations. Choose one or more of the following:

FileSystem: This includes the File System as well as the rest of the shell.

UrlHistory: URLs in the User's History.

UrlMRU:
Include the URLs in the user's Recently Used list.

If all three are FALSE, IEAddress wil use Default settings, which is the same as choosing all three.

RegistryUpdate: 

IEAddress also keep a dropdown-list of typed URLs
in the same way as IE address-combobox. In IE these typed URLs are saved in registry, for using next time you open the browser.

If you set RegistryUpdate to TRUE, IEAddress will save typed URLs to registry.


Events:

OnUrlSelected(Url : String);

Called when user selects a URL in the Address edit-box. 

 TIEAdress is a TCustomComboBox descendant build around SHAutoComplete in shlwapi.dll. You can read more about SHAutoComplete on MS-site:

http://msdn.microsoft.com/library/psdk/shellcc/Shell/SHLWAPI/Version/SHAutoComplete.htm 

More features could be added to the component. Feel free to contribute with enhancements, ideas, bug-fix etc.

A true imitation of IE address-combobox (filtering of prefixes like "http://" or "www", quick-search etc.) would need implementation of IAutoComplete2, which requires Windows 2000.

NB: The use of IEAddress component requires IE 5.


Updates:

Ver. 0.90: (December 5 1999)
First version of the component by Per Lindsų Larsen

Ver 1.00: (december 27 1999)
Enhancements by Pete Lyn Morris

Ver 1.01: (december 30 1999)
Enhancements by Khalid Almannai

Ver 1.02: (January 11 2000)
Enhancements by Pete Lyn Morris and Henri Fournier

Enjoy!

 

Download IEAddress ver. 1.02

IEAddress Component for Delphi 4/5

 

Created and maintained by
Per Lindsų Larsen

Last Update: January 18, 2000