Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Time 2

Status
Not open for further replies.

WaitronUnit

IS-IT--Management
Dec 2, 2003
38
0
0
I am a beginner using VB and have written a simple project in VB6 that sends instructions to a commercial kitchen printer. The user pushes buttons on a touch-enabled screen. It does most of what I need it to do, but I need help with two things:

(1) How do I have it print the time at which the print command was sent (it is going to an Epson receipt printer and it needs to show date and time)?

(2) How can I make the print larger on the ticket? There is no way using the DIP switches on the print device. Also, how can I change the font (it currently prints out 10 pt. Arial)?

(((Here are a few of the lines... I need the time to show up as part of the print job at command35)))

Private Sub Command31_Click()
Printer.Print "REPLENISH —"
Printer.Print " Dessert Section"
End Sub

Private Sub Command32_Click()
Printer.Print "HELP —"
Printer.Print " SP REQ - SEE LINE ATT. !"
End Sub

Private Sub Command33_Click()
Printer.Print " - - - TO GO - - -"
End Sub

Private Sub Command34_Click()
Printer.Print " - - - CXL LAST ORDER - - -"
End Sub

Private Sub Command35_Click()
Printer.EndDoc
End Sub


Thanks to anyone who can point me in the right direction. This is truly the first VB thing I have done and I am having to learn as I go....
 
The Now() function returns the current date and time.

Date() returns only the date.

Time() returns the number of seconds since midnight

Hour() returns 0-23

Minute() and Second() do exactly what you'd expect... 0-59
 
Epson printers come with multiple internal fonts and you should use one of them rather than the Windows True Type fonts because they are usually much faster than a downloaded font. Depending on your printer model there are fonts that are double height and/or double width. There are also ESCPOS commands to turn on double height or width printing.

Check the printer manual for the built-in fonts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top