Using the TFrameBrowser Component
To use the TFrameBrowser component, you must have event handlers that respond to the OnGetPostRequest and the OnGetImageRequest events. These events occur whenever a document or an image for a document is requested. These events require that the document or image be returned in stream form. In some cases, the return of the stream may be delayed to allow for downloading the information.
The general sequence of loading a document is as follows:
Further information on the OnGetPostRequest and OnGetImageRequest events is available in the
THtmlViewer.chm
file.
Connections
To obtain the document and image streams, the demo programs establish a connection.
A connection is obtained by calling
TURLConnection.GetConnection
and the proper type of connection is determined by the protocol on the
URL used in the call. It is through the connection concept that the various protocols are
supported. The Connection concept makes it easy to
add new protocols for specialized situations.
Once the Connection is established, the stream may be obtained, usually with the
Connection.Get
method.