[Ticket Print] Use the scanner to speed up the development of the visual programming tool

xiaoxiao2021-03-06  54

Today, I saw someone in the forum in the discussion of issues on the ticket printing in the DOS era, we are single-word printing directly with the method of controlling the printer object. In the program developed in the present graphical interface, there are still many people in using this method. Of course, the advantage of this method is obvious, the print position is accurate, easy to control paper, and can extend the printer life than other printing methods, saving printing costs. The only problem with printing is used to use Printer objects to adjust the location when the development is time. In many projects in now, we use visual programming tools, and the corresponding printing method has increased a lot. Some people use the method of using the Excel template to write input to the Excel template to control print. This method is advantageous, but its problem is to start an Excel application when printing. This problem is more prominent when making a lot of rapid printing. Now let's cut the topic, the package of the ticket is generally printed, the amount and other information may need to be previewed before printing, and then print, there is no need to print the content on the invoice when printing. Some units may need to print a copy of the graphic class on the basis of printing content. In actual operation, we scan the invoice with a scanner, use the graphics processing tool to create a grayscale, pay attention to the scan, may result in some modifications in size, need to adjust the size. Then printed out with the actual ticket contrast until the size is consistent. This process is very fast, probably just a few minutes, if the 15-inch display (1024 * 768) is used when developed, then the ratio of ticket size and screen is basically 1: 1 if it is a 17-inch display (1024 * 768) The display on the screen is larger than the actual print. When developing, a Form is selected, set the background color of the Form to white, and set the drawn drawing to the bottom chart. Adjust the Form to the same size as the image. The Label control is then dragged to the corresponding location (or), and you can change these Label in the program. This doesn't have to pass the line on the interface, but also go to the corresponding position over and over again. Basically, you can print directly after successful settings, and cancel the basemap of the Form before printing. This benefit is that you can preview before printing without taking special processes.

转载请注明原文地址:https://www.9cbs.com/read-118157.html

New Post(0)