millerdraft Level: Scholar
 Registered: 01-02-2003 Posts: 41
|
Username and Password with winsock
I have a program that I need to allow others to login to the program. I have the client form set to connect on form load.
Then when the click login in this is the code that I have for that.
Private Sub cmdLogIn_Click()
StrData = txtIDNumber.Text
wskServer.SendData txtIDNumber.Text
DoEvents
StrData = txtPassword.Text
wskServer.SendData txtPassword.Text
End Sub
Then that sends the info to the Server form. When that receives the data it has this as the code. The winsock on the server is an array. As to allow multiple connections.
dim intConnection as integer
Private Sub wskServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
DoEvents
wskServer(intConnection).GetData StrData, vbString
txtIDNumber.Text = StrData
DoEvents
wskServer(intConnection).GetData StrData, vbString
txtPassword.Text = StrData
DoEvents
End Sub
I am trying to figure out what I am doing wrong. Can I send the info like that? I have done that before or at least I am pretty sure that I have. Any help would be greatly appreciated. Many thanks in advance.
Ted
[Edited by millerdraft on 12-05-2003 at 09:58 AM GMT]
____________________________
Ted Moe
I wish I was real good at this stuff!
|