qkhoi
asked on
transfer data between 2 computers Using direct cable
Can I transfer the data between 2 computers use direct cable connect by VB and how ?
Can you give me a sample with it ?
Thank you very much.
Can you give me a sample with it ?
Thank you very much.
Yes, MSCOMM control can be used if you have modem cabel connected to the serial port of the computers. This is exactly what 3rsrichard is trying to explain. In the above example connect the cable between 2 com1 serial port.
>>>Can I transfer the data between 2 computers use direct cable connect by VB and how ?
>>>Can I transfer the data between 2 computers use direct cable connect by VB and how ?
If you use a cable only, then you have to have something to swap the wires on pins 2 and 3. A "Null Modem" or other device you can get at a parts store.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here's how you would send the string TXBUFF$
Form1.MSComm1.CommPort = 1
Form1.MSComm1.Settings = "1200,N,8,1"
Form1.MSComm1.PortOpen = True
Form1.MSComm1.InputLen = 0
Form1.MSComm1.Output = TXBUFF$
Heres how you could receive
RXBUFF$ = ""
Form1.MSComm1.CommPort = 1
Form1.MSComm1.Settings = "1200,N,8,1"
Form1.MSComm1.PortOpen = True
Form1.MSComm1.InputLen =
ComDelay = 0
Do
DoEvents
RXBUFF$ = RXBUFF$ & Form1.MSComm1.Input
Loop Until (ComDelay > 2)
Where ComDelay is hooked to a timer so that the program wont get hung up.