Winsock Control - Printable Version +- BP Forums (https://bpforums.info) +-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55) +--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56) +---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8) +---- Thread: Winsock Control (/showthread.php?tid=429) |
Winsock Control - Covert2String - 11-25-2011 Hey, I need help (again) with the Winsock Control (v 6.0 , and VB 2010). First, it seems that VB does not recognize state method, like: Code: If sock.State = sckListening Then Thank you <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s --> Re: Winsock Control - brandonio21 - 11-25-2011 Hey Covert2Sting, Thanks again for posting on BP Forums! First of all, I am not really sure why VB is not recognizing the State command for Winsocks, I mean.. It is a standard command. That is really strange. As for opening applications or opening a command prompt command, here is the code Code: 'To open applications Code: 'To send a CMD command via a CMD window Hope this helps a bit, sorry about not knowing the reasons for the unrecognized State property. Re: Winsock Control - Covert2String - 11-26-2011 I meant remotely execute an application. Re: Winsock Control - brandonio21 - 11-26-2011 Ah, via the Winsock control... I have no idea how to do this, sorry <!-- s --><img src="{SMILIES_PATH}/icon_razz.gif" alt="" title="Razz" /><!-- s --> Re: Winsock Control - Covert2String - 11-26-2011 Ok, one more thing, do you know how to create an array of winsock control? In VB 6 it was easy, but I can't figure it out in VB 2010... Re: Winsock Control - brandonio21 - 11-27-2011 Well, I have never really worked with the Winsock Control, so I have no idea if this would work, but you can give it a shot! Code: Dim wList As List(Of Winsock) Re: Winsock Control - Covert2String - 11-27-2011 Seriously, are you God? If not, how do you always have the answer?! Thank you!!! After googling for hours I couldn't find how to do it! Edit: Here: wList.Add(Winsock1) Winsock1 is the name of the control? As a string? Edit2: I forgot to say that I have to create another winsock control, not just add them to the list, how can I do that? Re: Winsock Control - brandonio21 - 11-27-2011 Well, I am not God. But thanks for the compliments!! Winsock1 is the name of the control, but it is the control itself. If you would like to actually create a new Winsock control, and add it to the list, do something like this Code: Dim WS1 As New Winsock Hopefully this helps! |