|
Asynchronous DownloadingThis small application will show you how to use the VB document to download a web page asynchronously from a web site. CODE:Option Explicit Private Sub UserDocument_AsyncReadComplete(AsyncProp As AsyncProperty) Dim FileNum As Long Select Case AsyncProp.PropertyName Case "dload" FileNum = FreeFile Open AsyncProp.Value For Input As FileNum Text1.Text = Input(LOF(FileNum), FileNum) Close FileNum End Select End Sub Private Sub UserDocument_InitProperties() Dim strPath As String strPath = "http://www.yoursite.com/home.asp" UserDocument.AsyncRead strPath, _ vbAsyncTypeFile, "dload" End Sub
| |||||||||||||||||||||||||||||||||||||||