vb parallel port xp¨
cristiaw said:
leilarazavi2000 said:
Any body knows how to access parallel port in vb6 (for win98 and xp)
tnx
I did a program for to send bits to a paralell port .. I you want I ll send source code... in this moment i cant because im in the work.
Bye
Christian
8)
'**************************************
' Name: Write data to COM/LPT ports with
' out using the API
' Description:This simple yet effective
' code lets you send any data to the COM/L
' PT ports on the computer.
' By: Jordan Bayliss-McCulloch
'
' Side Effects:If the data is sent to th
' e printer port (LPT1/2) and the printer
' is off or not connected, the program may
' freeze.
'
'This code is copyrighted and has
' limited warranties.Please see
**broken link removed**
' ww.Planet-Source-Code.com/xq/ASP/txtCode
' Id.31643/lngWId.1/qx/vb/scripts/ShowCode
' .htm
'for details.
'**************************************
Dim strTest as String
strTest = "This is the data I want To write."
'This will write strTest to LPT1
Open "LPT1:" For Output Access Write As #1
Print #1, strTest
Close #1
'This will write strTest to COM1
Open "COM1:" For Output Access Write As #1
Print #1, strTest
Close #1
'It's that simple!