Article ID: 174836
Article Last Modified on 8/20/2007
170365 : INFO: Visual Studio 97 Service Packs - What, Where, and Why
175450 : INFO: Visual Basic 5.0 Fixes in Visual Studio 97 Service Pack 3
Public Sub AddURL(ByVal sURL As String, _
Optional ByVal sTitle As String = "", _
Optional ByVal sSize As String = "", _
Optional ByVal lSizeUnit As Long = 0)
inetDownload.Execute sURL, "GET"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Const lCHUNKSIZE As Long = 1024
Dim vtData As Variant ' Data variable.
Select Case State
' ... Other cases not shown.
Case icError ' 11
' In case of error, return ResponseCode and
' ResponseInfo.
vtData = Inet1.ResponseCode & ":" & _
Inet1.ResponseInfo
Case icResponseCompleted ' 12
Dim strData As String: strData = ""
Dim bDone As Boolean: bDone = False
' Get first chunk.
vtData = Inet1.GetChunk(lCHUNKSIZE, icString)
DoEvents
Do While Not bDone
strData = strData & vtData
' Get next chunk.
vtData = Inet1.GetChunk(lCHUNKSIZE, icString)
DoEvents
If Len(vtData) = 0 Then
bDone = True
End If
Loop
Case icDisconnected
Debug.Print "* Disconnected"
Unload Me
End Select
End Sub
Private Sub Form_Load()
Load form1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload form1
End Sub
Private Sub Command1_Click()
form1.AddURL "http://www.microsoft.com"
End Sub
Keywords: kbbug kbfix kbvbp500sp3fix kbvs97sp2fix KB174836