|
|
|
Star Printer ProgrammingProgramming SamplesProgramming Tools: 1. StarComm Summary: StarComm is a Visual Basic component (.ocx file) which allows for easy communication with Star printers over any interface type. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Download: 2. StarComm.NET Summary: The StarComm.NET project is a .NET version of the StarComm project above. The project consists of a class library (WLStarComm.dll) and control library (StarComm.dll) and a document explaining it's usage. Note: For information on programming samples for StarComm.NET, please click here. Operating System: Windows (All Versions) Programming Language: Visual Basic.NET, C#.NET, J#.NET, Managed C++ Download: Programming Samples: Find Topic: 1. Two Color Printing Summary: This sample demonstrates printing in both red and black to two color enabled printers. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: Miscellaneous Download Project Files: Download Text Sample: Back to top 2. Opening connected Cashdrawer Summary: This sample demonstrates opening the connected cash drawer. The Star command for opening the cash drawer is 07 (Hex) or 7 (Dec). Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: Miscellaneous Download Project Files: Download Text Sample: Back to top 3. Printer Status (Direct to Port) Summary: This sample allows a user to receive printer status bytes over a parallel or serial connection. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: Status Download Project Files: Download Text Sample: Back to top 4. Printer Status (Windows Driver) Summary: This sample allows a user to receive printer status bytes using the Language Monitor embedded in the Windows driver. Note: This sample includes code for displaying printer Online/Offline status. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: Status Download Project Files: Download Text Sample: Back to top 5. OPOS Summary: This sample demonstrates OPOS usage in a Visual Basic sample. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: OPOS Download Project Files: Download Text Sample: Back to top 6. Printing to the Windows Spooler (winspool.drv) Summary: This sample demonstrates printing through Windows drivers using the "winspool.drv" link library. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: Spooler Download Project Files: Download Text Sample: Back to top 7. TCP300 Card Reader/Writer Summary: This sample demonstrates all TCP300 printing abilities, including magnetic stripe reading and writing. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: TCP300/400 Download Project Files: Back to top 8. TCP300 BMP Store Summary: This sample demonstrates storing BMP images in the TCP300's ROM2 flash memory for continual usage. Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: TCP300/400 Download Project Files: Back to top 9. TCP300 BMP Printing Summary: This sample demonstrates printing all image types using a TCP300. (Images are converted to BMP before sending to printer.) Operating System: Windows (All Versions) Programming Language: Visual Basic 6 Topic: TCP300/400 Download Project Files: Back to top 10. JavaPOS Summary: This sample demonstrates JavaPOS usage using the Java Runtime Environment. Operating System: Platform Independant Programming Language: Java Topic: JavaPOS Download Text Sample: Back to top StarComm.NET Programming Samples: In general, writing code for StarComm.NET would work very similarly to writing code for StarComm. The syntax is slightly different depending on what language you're using, but the arguments and methods used should be identical. For example, to print red text to a two color capable printer in StarComm, the syntax is as follows: [Visual Basic 6] ' Enable two color mode StarComm1.StarComm_Output Chr(&H1B) & Chr(&H1E) & Chr(&H43) & Chr(&H31) ' Set the color to red StarComm1.StarComm_Output Chr(&H1B) & Chr(&H1E) & Chr(&H63) & Chr(&H31) While in the .NET languages, the syntax looks like this: [C#] // Enable two color mode
StarComm1.StarComm_Output("\x1B" + "\x1E" + "\x43" + "\x31");
// Set the color to red
StarComm1.StarComm_Output("\x1B" + "\x1E" + "\x63" + "\x31");
[Visual Basic.NET] ' Enable two color mode StarComm1.StarComm_Output Chr(&H1B) & Chr(&H1E) & Chr(&H43) & Chr(&H31) ' Set the color to red StarComm1.StarComm_Output Chr(&H1B) & Chr(&H1E) & Chr(&H63) & Chr(&H31) For additional help
with in-house applications that will print to Star printers |
|