PDA

Click to See Complete Forum and Search --> : VB and Winsocks programming


NullDevice
May 12th, 2003, 12:15 AM
hello everybody

can anyone suggest a good reading for winsocks programming using VB

i want to program a chat s/w for LAN with file transfer facility.....and no server/client type will be able to detect who is online and who is not.........

well the 1st prob is that of multiple connections on single winsocks....well i thought of creating a new winsocks control at run time........and give it a different port..but how can i know that another application is not using the same port..........

second thing that i want to discuss is that.i want to use single chat form..that is when the user will click on a listed username he will be presented with a form to enable him to chat.....for that purpose i want to use single form and load load a new from this form at ru time...but that form will also contain the code...let us say to make the text colorful....so how can i write a code that will change such properties at run time............

tampabay420
May 12th, 2003, 01:13 AM
wwww.planetsourcecode.com has quite a few multi-user winsock projects available for download... or try googling... "VB Winsock Multiple user file transfer" or something like that?

/edit-> if your pretty new to VB then i'd suggest taking it slow... try to get two winsock client/servers to talk first...

although a decent start for winsock...

use the Data Arrival method...
inside the Winsock1.DataArrival method...
Data_Var = Winsock1.getdata()
frmMAIN.text1.seltext = Data_Var & Char$(13)

to send data first connect;

Winsock1.connect hostname, port

then make sure to see if Winsock1.state = sckConnected (or 7)
before sending any data Winsock1.send or Winsock1senddata....
not sure right now- don't have vb with me...

i'll read up a bit and try to help ya out more- pm me if ya need anything else :D

shadow_dancer
May 12th, 2003, 05:56 PM
i never made any winsock prog using VB, but i ever made it with C++ .. tampabay said nice with his sote link.
I found these either mate :
http://www.acky.net/vb/vbtcp/
http://www.fortunecity.com/skyscraper/fortune/615/vbwinsock.html
http://www.vbip.com/default.asp

-Shad

d12ewman
November 23rd, 2003, 02:40 PM
hey
i think you definitely will want to check out http://www.winsockvb.com
it has tutorials and all other questions you may want answered

Wesam
April 20th, 2004, 08:52 AM
a good place to get ready, and easy to understand codes:->
http://pscode.com

TheSpecialist
April 20th, 2004, 09:01 AM
Now that this year old thread is up top... |The|Specialist mumbles something about how he wishes noobs wouldn't bother responding to year old threads. Useing the search features and things is already such a time consumeing task... so why do peaple keep thinking its ok for other member haveing to go through all of this agian & about explaining why the dates are flashing.