If this is a non-PPC device, the the CMD command processor should be available, and you could call it to execute a batch file,. Certainly, as you note, this technique will not catch any errors -- but what error will any code catch? Of course, if you do what you want, you can add some delays between printing lines -- and such delays may be needed.
It would seem that you do not have the correct settings on your serial port or some other issue. Your thread sleep is not necessary because the close method will ensure that the data is flushed. I have actually written code to print tags out of a serial bar code printer in the. NET CF before.
I created an object oriented design which allowed me to create barcode tag formats which specified their design lines, string fields, barcode areas, etc to which then I could make a barcode tag object and just fill in the fields and pass that to a printer object to print the tag.
I believe I sat down with the documentation to the printer and just came up with a good abstract API that saved me a lot of hassle in the future. The library itself understood all the esoteric printer commands and formatted the strings to send over the serial port. BarcodeTagFormat allowed me to create a format for a type of tag, which specified the names of several fields for data, and understood how to draw this tag, but did not contain the tag specific data. BarcodeTag was created from the BarcodeTagFormat, perhaps kinda like a factory type pattern, the fields could be filled in with data through a bound string field, and then the tag was passed to a BarcodePrinter.
Print tag function. I was suggesting this because it could make it look a little cleaner, and save anyone else in the future the hassle of learning how to format commands to the printer just to use it. After you have a library that wraps it, you can simply construct the tags and send them to the printer without having to understand exactly how the printer works. The content you requested has been removed. Ask a question. Quick access. Search related threads.
Remove From My Forums. This site uses cookies to provide an improved digital experience. You can learn more about the cookies we use as well as how you can change your cookie settings by clicking here. By continuing to use this site without changing your settings, you are agreeing to our use of cookies. The SL comes standard with an RS 9 pin interface for serial communications.
The content you requested has been removed. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Windows Forms Data Controls and Databinding. Sign in to vote. Hi, I am doing label printing using Intermec easycoder I have find 2 alternatives way 1. Writing all the data in a text file and then send the text file using bat command.
Below is my code: Process. My question is is it possible to have the bat command execute in VB? My second alternative is writing line using serial port.
0コメント