perdon no lo are mas :(
, me podrian contestar esta duda, ya ice como un supermini troyano, pero asi
el form1, donde salen opciones, ej: teclas presionadas, xat, y todo, entonces el form2 es el xat, y asi sigue, pero cuando cambio de form se pierde la conexcion?¿, le coloke esto, pero tampoko Winsock1.Connect
, esa es una duda xfa
y lo otro era que cuando le coloke un label para ver el estado, no me funca no me sale
Private Sub Command1_Click()
On Error Resume Next
Ws.RemoteHost = Text3.Text
Ws.Connect
Timer1.Interval = 2000
End Sub
Private Sub Timer1_Timer()
If Not Ws.State = 7 Then
Label3 = "Desconectado"
Else
End If
If Ws.State = 7 Then
Label3 = "Conectado"
Else
End If
End Sub
y esto no me funca,
ayuda pliss
alomejor es porque cierrar el form donde esta el ws.
explicate algo mejor porfa
asi:
form1
Private Sub Command1_Click()
On Error Resume Next
Ws.RemoteHost = Text3.Text
Ws.Connect
Private Sub Command2_Click()
form2.show
[b]esto esta con winsock[/b]
form2
Private Sub Form_Load()
Ws.Connect
End Sub
Private Sub Ws_DataArrival(ByVal bytesTotal As Long)
Dim datos As String
Ws.GetData datos
Text1.Text = Text1.Text & datos & vbCrLf
End Sub
Private Sub Command2_Click()
On Error Resume Next
Dim enviar As String
enviar = Text4.Text & " dice: " & Text2.Text & vbCrLf
Ws.SendData enviar
End Sub
[b]copie el mismo winsock de arriba[/b]
pero aber donde esta el winsock en el form1 o 2 ¿?
en los 2, es el mismo
lo copie
no hace falta que lo pongas en los dos por ejemplo:
el form1 es el index por llamarlo así que es el form que tiene todo.
vale el form2 es el chat pues lo único que tienes que hacer es:
form1:
Private Sub Command1_Click()
On Error Resume Next
Ws.RemoteHost = Text3.Text
Ws.Connect
Private Sub Command2_Click()
form2.show
end sub
Private Sub Ws_DataArrival(ByVal bytesTotal As Long)
Dim datos As String
Ws.GetData datos
form2.Text1.Text = form2.Text1.Text & datos & vbCrLf
End Sub
form2:
Private Sub Command2_Click()
On Error Resume Next
Dim enviar As String
enviar = Text4.Text & " dice: " & Text2.Text & vbCrLf
form1.Ws.SendData enviar
End Sub
;D Salu2
ok vale