Library code snippets
Make sure the Inet control has all its data
By ElementK Journals, published on 14 Jul 2001
When you issue the GetChunk command for the Inet control, don't
forget to wait until it's done before continuing with code that
manipulates the return values. Depending on the user's connection
speed, the GetChunk method may take several seconds. To give the
method a chance to complete before executing the rest of the code,
use the DoEvents keyword, like so:
Private Function GetData()
Dim vData As Variant
Dim strTemp As String
Do
vData = Inet1.GetChunk(256, icString)
DoEvents
If Len(vData) Then
strTemp = strTemp & vData
lblBytesReceived.Caption = CStr(Len(strTemp))
End If
Loop While Len(vData)
GetData = strTemp
End Function
Related articles
Related discussion
-
Regarding Visual Basic Programme
by manjunathsl2007 (0 replies)
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
-
VB6 compatability from XP to Vista
by bronx (1 replies)
This was exactly what I needed. Thanks.
- Steve
This thread is for discussions of Make sure the Inet control has all its data.