GrabURL
ActiveX Control
Introduction
Quick Start
Delphi
Visual Basic
MS Visual C++
Control Summary
Distribution
Control Homepage
Updated:
03/16/2001
|
|
Control Summary
Data Constants
Constants are used by GrabURL to report Browser ID and URL Type information to your programs event handlers in ways that at easy to use in switch/case statements.
These constants are defined in the GrabURL type library, and will be defined in any program that uses the control.
TxBrowserType: Set of browser ID constants (returned as BrowserType in events)
- brMSIE (Microsoft Internet Explorer)
- brAOL (America Online)
- brMSN (MSN Explorer)
- brNetCaptor (NetCaptor)
- brNeoPlanet (NeoPlanet)
- brOpera (Opera)
- brNetscapeGecko (Netscape Version 6)
- brNetscape (Netscape Version 3, 4 and 5)
- brOther (Sun HotJava, Mosaic, and other unrecognized browsers)
TxURLType: Set of URL Type constants (returned as URLType in events, self-explanatory)
- utHTTP
- utHTTPS
- utFTP
- utMAILTO
- utTELNET
- utGOPHER
- utOTHER
Component Methods
StartFetch
Calling the StartFetch method begins enumerating browser data on the currently running system.
As browser data is obtained, events are fired for each set of data.
StartFetch does not return until all event callbacks have been made.
StartFetch takes no paramaters and returns no value directly.
Calling StartFetch
| Microsoft Visual C++ |
membername.StartFetch(); |
| Delphi |
Componentname.StartFetch; |
| Visual BASIC |
Objectname.StartFetch |
Component Events
GrabURL for ActiveX returns all its data to your program by means of events. These events are initiated by your program by simply calling the StartFetch method.
GrabURL's event system is designed to allow you to sort and process browser data with a minimum of code, and without the absolute need for using complex data structures.
Events returned by GrabURL
| Event Name |
Event Type |
Always Called |
Browser Specific |
| OnURL |
Pre-Processing |
|
|
| OnMSIE |
Pre-Processing |
|
Internet Explorer |
| OnMSN |
Pre-Processing |
|
MSN Explorer |
| OnAOL |
Pre-Processing |
|
America Online |
| OnNetscape |
Pre-Processing |
|
Netscape |
| OnOpera |
Pre-Processing |
|
Opera |
| OnNeoPlanet |
Pre-Processing |
|
NeoPlanet |
| OnNetCaptor |
Pre-Processing |
|
NetCaptor |
| OnOther |
Pre-Processing |
|
Other/Unknown |
| OnAcceptedURL |
Post-Processing |
|
|
| OnDiscardedURL |
GrabURL return two types of events: pre-processing and post-processing events.
Event firing order:
- Pre-processing browser specific event. (OnMSIE, OnAOL, etc)
- Pre-processing non browser specific event, OnURL.
- Post-processing event, either OnAcceptedURL or OnDiscardedURL, depending on the state of the 'Process' flag used in Pre-Processing events.
Events will have slightly different definitions depending upon how your programming language handles the ActiveX type library, and how it maps OLE compatible types to your own languages data types.
Pre-processing events are defined in the type library as:
function(
DocumentHWND: Integer; BrowserType: TxBrowser; URLType: TxURLType; BrowserID, DocumentTitle, DocumentBody: WideString; var URL: WideString, var IsTopMost, Process: WordBool ): HResult; |
Paramaters passed to pre-processing events are:
| DocumentHWND |
Windows handle to the browser window being enumerated. For MDI documents this is the handle of the parent browser. |
| BrowserType |
One of the constants defined in the enumerated set TxBrowserType, identifying the browser. |
| URLType |
One of the constants defined in the enumerated set TxURLType, identifying the URL category. |
| BrowserID |
Human readable string containing the browser ID. |
| DocumentTitle |
Title of the browser document being enumerated. |
| URL |
URL of the browser document or frame being enumerated. With supported browsers this may be modified by your event handler. |
| DocumentBody |
Source of the browser document body being enumerated, if available for this browser. If not available this a zero length string. |
| IsTopMost |
Boolean value representing the document windows (or parent window if an MDI document) current Top-Most Z-Order status. Changing the value of this variable during the event handler will cause the document Z-Order to change accordingly. |
| Process |
Determines if the OnAcceptedURL or OnDiscardedURL event will be called in the Post-Processing phase. This value starts TRUE by default, and can be changed in value by any Pre-Processing event. |
Post-processing events are defined in the type library as:
function(
DocumentHWND: Integer; BrowserType: TxBrowser; URLType: TxURLType; BrowserID, DocumentTitle, DocumentBody: WideString; var URL: WideString; var IsTopMost: WordBool; Processed: WordBool ): HResult; |
Paramaters passed to post-processing events are:
| DocumentHWND |
Windows handle to the browser window being enumerated. For MDI documents this is the handle of the parent browser. |
| BrowserType |
One of the constants defined in the enumerated set TxBrowserType, identifying the browser. |
| URLType |
One of the constants defined in the enumerated set TxURLType, identifying the URL category. |
| BrowserID |
Human readable string containing the browser ID. |
| DocumentTitle |
Title of the browser document being enumerated. |
| URL |
URL of the browser document or frame being enumerated. With supported browsers this may be modified by your event handler. |
| DocumentBody |
Source of the browser document body being enumerated, if available for this browser. If not available this a zero length string. |
| IsTopMost |
Boolean value representing the document windows (or parent window if an MDI document) current Top-Most Z-Order status. Changing the value of this variable during the event handler will cause the document Z-Order to change accordingly. |
| Processed |
Final boolean value of the 'Process' variable passed to your pre-processing event handlers. If unchanged in any event handler this value will be TRUE. |
Example of event flow when calling StartFetch method from your application.
|