Hi to all
I want to connect with a barcode printer and send him some specific characters and take back anything they send to me
In VB6 i have use the winsock and (for me) the things is simple....
Please could you help me to make something similar with vb.net.Code:Winsock1(totlistsite_w).RemoteHost = ListView1.ListItems(totlistsite_w).SubItems(1) Winsock1(totlistsite_w).RemotePort = ListView1.ListItems(totlistsite_w).SubItems(2) Winsock1(totlistsite_w).Connect Do txtCounter = "" If Return_Status.Enabled = False Then Exit Do If ListView1.ListItems(totlistsite_w).ListSubItems(6) = "" Then Exit Do DoEvents If Winsock1(totlistsite_w).State = 7 Then Winsock1(totlistsite_w).SendData "!V32 1" & vbCrLf txtCounter = ReadString1(Winsock1(totlistsite_w)) End If Loop Until Winsock1(totlistsite_w).State = 7 Or Winsock1(totlistsite_w).State = 9 Winsock1(totlistsite_w).Close
What did you sugest to use sockets or winsock??
An example it will be much acceptable!!!
Thanks and regards.




Reply With Quote
