Ok... I am making a chat program. When the program starts... it asks for a nickname. I have the nickname to appear in the users list when connected.. but it only shows mine... I want to know how I can show theirs and mine in the users text box.... Would i associate Winsock1.remotehost with the nickname?
And the easier part...
I use this to show the text... from their bar to the room...
when I hit enter, it erases the users private text box (text 2) and then places the text in the chat room field. (text1) But when the other person, or I enter in another message then it erases everything in the chat window... It does this because I have it (text1 = text2). How can I make the text go to the other window without erasing the text already in there?Code:Dim New_Line As String 'Reset the position of the last line feed if the 'user has clear the chat window If Trim(Text2) = vbNullString Then Last_Line_Feed = 0 'If the user pressed Enter... If KeyAscii = 13 Then New_Line = Mid(Text2, Last_Line_Feed + 1) 'Save the position of the current linefeed Last_Line_Feed = Text2.SelStart 'Send the new text across the socket Winsock1.SendData New_Line StatusBar1.Panels(2).Text = " Sent " & (LenB(New_Line) / 2) & " bytes " Text1 = Text2 Text2 = "" End If
Help Please!
Thanks
-Sac




Reply With Quote