Ras Posted March 9, 2007 Report Posted March 9, 2007 Intra in VB si creeaza un proiect nou.Adauga Winsock Control (apesti CTRL + T si bifezi Winsock Control).Creeaza 2 textboxes, 2 buttons, 1 timer, 1 listbox, 1 winsockPrimul textbox este pt IP, al doilea textbox pt port, primul buton pt start, al doilea pt stop.Pune timerul False si pune intervalu 10 sau chiar 1(daca pui 1 are viteza mai mare).In primul buton scrii:Private Sub Command1_Click()Winsock1.RemoteHost = Text1.TextWinsock1.RemotePort = Text2.TextWinsock1.ConnectTimer1.Enabled = TrueEnd SubIn timer scrii:Private Sub Timer1_Timer()Winsock1.CloseText2.Text = Int(Text2.Text) + 1Winsock1.RemoteHost = Text1.TextWinsock1.RemotePort = Text2.TextWinsock1.ConnectEnd SubIn winsock scrii:Private Sub Winsock1_Connect()List1.AddItem "Port " & Winsock1.RemotePort & " is having a yard sale."End SubIn al doilea buton scrii:Private Sub Command2_Click()Timer1.Enabled = FalseWinsock1.CloseEnd SubThis is all!Bafta! Quote