|
Barcode, labelling and utility software |
Quick_links...Search siteTrial productsOnline tutorials Products
| Barcodes in DelphiFor creating barcodes in the Delphi environment the component available for use with the dBarcode DLLs is ideal. The components are derived from TImage and so offer all the flexibility of the native component. Screenshot - click to enlarge InstallationThe Tbarcodenn class is provided as source code is provided in a PAS file. The component may be installed by installing the component as a PAS file and compiling the resulting user library. The component’s icon (which is a TImage icon) will appear in the Samples page of the available components. Using TbarcodeThe barcode component is based on the TImage and so inherits many of its properties from this object. Over and above this, the component supports properties specific to its application, in this case the production of Barcodes. The component can be placed on a form and its properties set a Design time or altered through code at Run-Time. A sample application is included with each product in the form of the dBarcode1 project, which includes the UNIT1.PAS source file. A typical example is shown below
Printing the barcodeTo print a barcode image one approach is to Draw the Picture on the Printer.Canvas, as shown in the code sample below. Note that the Picture is created in HIMETRIC units, and so to print the image at the correct size these must be converted into printer pixel units using the GetDeviceCaps() function. procedure TForm1.Button2Click(Sender: TObject); |
|
Sites operated by DL Technology Ltd
dLSoft is a registered trade mark of DL Technology Ltd, a company registered in England number 3615271
|