Re: My chat server + client
Well for your client you can use:
Code:
Private Sub Text1_Change()
With Text1
.SelStart = Len(.Text) + 1
End With
End Sub
But Im not so positive on the server part.
Re: My chat server + client
i use a list will that still work?
EDIT
nope it didn't work with List1 i changed the Text1 to List1's if ur wondering lol
Re: My chat server + client
Oh, didnt know you where using a Listbox, try this.. Add a timer and put this in it. Use a interval of about 500 (You can change it if needed).
Code:
Private Sub Timer1_Timer()
With List1
.ListIndex = .ListCount - 1
End With
End Sub
Re: My chat server + client
Re: My chat server + client
Well on your server you can also have like a label for the users.
Code:
Dim i as long
Private Sub Form_Load()
Label1.Caption = "Online Users :: 0"
i = 0
End Sub
Like that. Then in the Socket_ConnectionRequest put something like
Code:
i = i + 1
With Label1
.Caption = "Online Users :: " & i
End With
And in the Socket_Close sub put something like
Code:
i = i - 1
With Label1
.Caption = "Online Users :: " & i
End With
Now this may now work to good because clients with sockets can have multiple connects to the server. So it may count the same connection twice because of sockets. But thats the general idea of it.