Private Sub dsSocket1_Exception(ErrorCode As Integer, ErrorDesc As String)
On Error Resume Next
dsSocket1.Close
Command1.Caption = "connect"
Text1 = Text1 & vbCrLf & Description & vbCrLf
End Sub
Private Sub dsSocket1_Receive(ReceiveData As String)
On Error Resume Next
Text1 = Text1 & ReceiveData & vbCrLf
'you could put in some commands if ya wanted..
'its pretty simple acually ... just do it like chat
'commands .... split the text up and use a trigger
'word like "/dns" and then get the text after it
'(the user name to get the IP from) and then have
'it send the info.
'hint: you could make a remote admin. client with
'the info provided with this. just code
'commands in a server and your set.
'have fun with this, and, if someone wants help
'with this type of program, please either tell them
'where to get my forms, or send them to them
'yourself. be a nice person bout it, dont be like
' "you need source, code it on your own" cause if
'you have these forms, that basically means you
'couldn't do it on your own. 8^)
' -senate
End Sub
Private Sub Form_Load()
ask1 = InputBox("What would you like your handle to be for chatting?", "handle", "Jon Cromer, Texas Ranger.")
If ask1 = "" Then ask1 = "some guy from Kansas"
txtHandle = ask1
server.txtHandle = ask1
Text3 = dsSocket1.LocalDotAddr
MsgBox "this is just a quick example i made for a friend but then i figured, what the hell, and sent it to kip to post on his site cause he's cool. he was the first person to post my html editor. thanks kip.", 55, "omfg!!! words from senate!!! lol"
server.Show
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
dsSocket1.Close
server.dsSocket1.Close
server.dsSocket2.Close
Unload Me
Unload server
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then 'if the enter key is pressed
Packet$ = txtHandle & ": " & Text4 'puts handle and text together into a string to send