I am creating an app to print bar code labels to a label printer and need to print/write directly to the lpt port
the below code is in VB 6, and I need to create this in VB.NET 2005.
Open "LPT1:" For Output As #1
Print #1, _
"^XA^MMC^MNN^MTT^PON^PMN^JMA^PR4,4^JUS^CI0^XZ"
Print #1, "^XA"
Print #1, "^LH0,0^LL" & lYLabelLen
Print #1, "^BY2,3,70^FT425," & lYBarCode & _
"^B3N,N,,N,N"
Print #1, "^FD" & "9999" & "^FS"
Print #1, "^FO400," & lYText1 & "^A0N25,25"
Print #1, "^FD" & "CALIBRATION" & "^FS"
Print #1, "^FO665," & lYText2 & "^A0N25,25"
Print #1, "^FD" & "9999" & "^FS"
'Next label is 250 added to y
lYBarCode = lYBarCode + 250
lYText1 = lYText1 + 250
lYText2 = lYText2 + 250
Print #1, "^XZ"
Close #1
I did run across this
FileOpen(1, "LPT" & CStr(portnum), OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.LockReadWrite, -1)
but am now confused on how to print/write to it.
Can anyone point me in the right direction?
Thanks in advance!