Test Foro de elhacker.net SMF 2.1

Programación => .NET (C#, VB.NET, ASP) => Programación General => Programación Visual Basic => Mensaje iniciado por: saliaz en 19 Septiembre 2009, 14:21 PM

Título: error :winsock1 variable no definida
Publicado por: saliaz en 19 Septiembre 2009, 14:21 PM
error winsock1: variable no definida

CitarOption Explicit
Private Sub Form_Load()
Winsock1.LocalPort = 80
Winsock1.Close
Winsock1.Listen
If Winsock1.State = 2 Then Label1.Caption = "Escuchando"
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
On Error Resume Next
Winsock1.Accept requestID
If Winsock1.State = 7 Then Label1.Caption = "aceptado"
End Sub
Private Sub desconectar_Click()
Winsock1.Close
If Winsock1.State = 0 Then Label1.Caption = "desconectado"
End Sub
Private Sub iniciar_Click()
Winsock1.SendData "iniciar"
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Winsock1.GetData SaveIn, vbString
End Sub
Título: Re: error :winsock1 variable no definida
Publicado por: seba123neo en 19 Septiembre 2009, 18:24 PM
declaraste la variable SaveIn ?? no entiendo para que ponen Option Explicit si despues no declaran nada...¿ o esta en un modulo ?
Título: Re: error :winsock1 variable no definida
Publicado por: saliaz en 19 Septiembre 2009, 23:07 PM
se me paso declarar la variable Save in,jeje...de todas formas ya funciona faltaba añadir el control winsock al form
Título: Re: error :winsock1 variable no definida
Publicado por: fary en 23 Septiembre 2009, 15:58 PM
y ese programa para que era??