Hello everyone:
I am writing a program (Visual Basic 6.0) that must print a time in-out to a receipt printer (LPT1).
-- There are two pirnters (receipt printer[LPT1] and a Laser printer) connected to a PC [windows-98 operating system]
-- The Laser printer is set up as a default
I need to print the following text:
TIME KEEPER
===========
Emp-ID: JAM-0125
Date: 01/30/2003
Time-IN: 08:00:00 AM
Time-OUT: 05:00:00 PM
Here some code :
----------------
Dim fl As Long
fl = FreeFile
Open "LPT1:" For Output As #fl
Print #fl, "TIME KEEPER"
Print #fl, "==========="
Print #fl, ""
Print #fl, "Emp-ID: " & EmpID
Print #fl, "Date: " & format$(date, "mm/dd/yyyy"
Print #fl, "Time-IN: " & sTimeIN
Print #fl, "Time-OUT: " & sTimeOut
Print #fl, "-----Last Line------"
Close #fl
Questions:
==========
By only specifiying Open "LPT1:", will my code be able to send the data to the receipt printer (LPT1)?
Remember my Laser printer is setup as a default.
Any tips it will be appreciate it.
Thanks to all for your time.
Daniel
Hollywood, FL USA
I am writing a program (Visual Basic 6.0) that must print a time in-out to a receipt printer (LPT1).
-- There are two pirnters (receipt printer[LPT1] and a Laser printer) connected to a PC [windows-98 operating system]
-- The Laser printer is set up as a default
I need to print the following text:
TIME KEEPER
===========
Emp-ID: JAM-0125
Date: 01/30/2003
Time-IN: 08:00:00 AM
Time-OUT: 05:00:00 PM
Here some code :
----------------
Dim fl As Long
fl = FreeFile
Open "LPT1:" For Output As #fl
Print #fl, "TIME KEEPER"
Print #fl, "==========="
Print #fl, ""
Print #fl, "Emp-ID: " & EmpID
Print #fl, "Date: " & format$(date, "mm/dd/yyyy"
Print #fl, "Time-IN: " & sTimeIN
Print #fl, "Time-OUT: " & sTimeOut
Print #fl, "-----Last Line------"
Close #fl
Questions:
==========
By only specifiying Open "LPT1:", will my code be able to send the data to the receipt printer (LPT1)?
Remember my Laser printer is setup as a default.
Any tips it will be appreciate it.
Thanks to all for your time.
Daniel
Hollywood, FL USA