I've been looking at this as well. However, I had some questions...Is it possible to get a listing of user names in a list box of all users connected to the server socket? Kind of like "Users Logged On" ?
Also what about replacing :-) with smilies in the lisbox ?
Jon
Yes, it is possible to list the users... I'll change the program to do that and i'll re-upload it when I'm done.
But I can't do the smilies picture thing, don't know how to do it, maybe by using a rich text box, but don't have much experience using it...
Here it is, now the server supports multiple connections, up to 32768 (the max for integer) clients if i'm not mistaken...
It does not check for duplicate user names. That can be changed easily, but not me... i've done enough, don't wanna waste my time on this...
Originally posted by «°°phReAk°°» You just need to put the picture (smily face) you want into the clipboard, then paste it into a richtextbox..
VB Code:
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const WM_PASTE = &H302
ClipBoard.SetData Picture.Picture
SendMessage RichTextBox.hWnd, WM_PASTE, 10, 10
Phreak
I put this in a form:
VB Code:
Option Explicit
Const WM_PASTE = &H302
Private Sub Form_Load()
Clipboard.SetData Picture1.Picture
SendMessage RichTextBox1.hWnd, WM_PASTE, 10, 10
End Sub
And inside a module I did:
VB Code:
Option Explicit
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
I placed a PictureBox (Picture1) on the form with a picture on it...
the code doesnt do anything...it does not paste that picture into the rich text box.