|
-
Jun 1st, 2006, 10:10 AM
#1
Thread Starter
New Member
Winsock Question
Hi,
I'm trying to write my first application using Winsock. I'm trying to retrieve the HTML code from a website. Here is what I have:
-------------------------------------------------
Dim WithEvents Winsock As MSWinsockLib.Winsock
Private Sub Form_Load()
With Winsock
.RemoteHost = "www.yahoo.com"
.RemotePort = 80
.Connect
.SendData "GET /"
End With
End Sub
Private Sub winsock_ondataarrival()
Dim rBuffer
rBuffer = Winsock.GetData
MsgBox rBuffer
End Sub
-------------------------------------------------
When I run it, I get:
'Run-time error '91': Object variable of With block variable not set'
When I click on 'Debug' it highlights the following line:
'.RemoteHost = "www.yahoo.com"'
Does anybody think they can point me in the right direction?
Thanks!
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|