HTMRaw is an ActiveX Control that enables you to retrieve HTML page and headers. This control has been tested in Windows 95, Windows 98 and Windows NT 4.0. To use and test your program with HTMRaw ActiveX control, you need an Internet connection. It is recommended to install Microsoft Internet Explorer 4.0 or later before using HTMRaw.
Copyright and License
You can use this control as a FREEWARE for educational and hobby purposes. This control will be SHAREWARE for commercial purposes (email me for further information). You are allowed to use this control if you agree that no support will be provided and use it at your own risk. If you have comments and suggestions, email me at
sar@writeme.comHTMRaw DOES NOT contain any constituent controls (intrinsic controls or Visual Basic standard built-in control or any other ActiveX controls). It is unlawful to create a new ActiveX control using HTMRaw control as a constituent control.
Versions
HTMRaw has two versions:
HTMRaw contains API calls to wininet.dll (Internet Extensions for Win32 included in Internet Explorer). This control is created and tested to call wininet version 4.72.3110.0. If you connect to Internet using proxy server, you must set the proxy address from the IE configuration.
HTML headers are the information sent by the remote server before the actual HTML page is retrieved. In the browsers such as Microsoft Internet Explorer and Netscape Communicator, HTML headers are not shown to user. Examples of HTML headers are the type of web server, page size, and date of page modification.
To retrieve HTML headers, you call
GetHeaders method and to get the actual HTML page, call GetHTML method. You can specify the URL (Internet address) as a parameter to both methods. Without this parameter, you must set the URL property.Control Details and Limitation
|
HTM Raw Version 1.0/1.1 |
HTM Raw Version 2.0 * |
File size limitation |
380 KB |
No Limit |
Threading model |
Apartment Threaded |
Apartment Threaded |
File format supported |
Htm/html/text |
Any format |
UserID-password connection |
Not supported |
Supported |
SSL protocol |
Not supported |
Supported |
Proxy server configuration |
** |
** |
Local Intranet address |
Not supported |
Supported |
* Future release of HTM Raw
** follows the Internet Explorer setting in registry
Follow this step-by-step guide to create a simple program to retrieve HTML page using Visual Basic and HTMRaw ActiveX control. Note that you need an Internet connection to debug and test your program.
Name |
Properties |
Form1 |
Height = 6200 |
Label1 |
Caption = URL |
Text1 |
Text = www.geocities.com/tokyo/garden/9484/ or your own URL |
Text2 |
Multiline = True |
Set your form and controls to the following layout:
Private Sub Form_Load() |
||
|
Text1.Text = "www.geocities.com/tokyo/garden/9484/" |
|
End Sub |
||
Private Sub WriteLine(Str As String) |
||
|
'This procedure will add a new line DoEvents |
|
End Sub |
||
Private Sub Command1_Click() |
||
|
'This procedure will retrieve HTML page from HRaw1.URL = Text1.Text HRaw1.UserAgent = "HRAW ActiveX Control" HRaw1.GetHeaders HRaw1.GetHTML End If |
|
End Sub |
||
Private Sub HRaw1_StartHTML() |
||
|
'This event is triggered just |
|
End Sub |
||
Private Sub HRaw1_EndHTML() |
||
|
'This event is triggered after HRaw control |
|
End Sub |
||
Private Sub HRaw1_BufferChange(ByVal ByteSize _As Long, ByVal Speed As Long, Cancel As Boolean) |
||
|
'This event is triggered a few times |
|
End Sub |