|
-
Feb 9th, 2000, 07:32 AM
#1
Here is the code...it is supposed to connect to the server and display "Hello World" when it connects to the server, All it does is keep the Command1 button disabled. Please help!!!
Option Explicit
Private Sub Command1_Click()
Winsock1.SendData "Hello World"
End Sub
Private Sub Form_Load()
Command1.Enabled = False
Winsock1.Connect InputBox$("Enter Server name:"), 7
End Sub
Private Sub form_unload(Cancel As Integer)
Winsock1.Close
End Sub
Private Sub winsock1_connect()
Command1.Enabled = True
End Sub
Private Sub winsock1_dataarrival(ByVal bytestotal As Long)
Dim temp As String
temp = String(bytestotal, Chr$(0))
Winsock1.GetData temp, vbString, bytestotal
MsgBox "hello"
End Sub
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
|