This tutorial briefly explains how to add Barcode ActiveX (professional versionand Lite version) in a Visual FoxPro program. The screenshots were taken fromVisual FoxPro 9. However, they should apply in FoxPro 6 and above.
![](/uploads/1/2/7/5/127577638/123058362.jpg)
Tutorial: Adding Barcode ActiveX to a Visual FoxPro Program
This example FoxPro application contains a small table called table1.This table has two fields: name and ID, whichstore the name and ID of employees. We would like to have barcodes for eachemployee in the report.
Microsoft Visual Foxpro is a database. Because Visual Foxpro programming as. 38 Page 39 Kemudian isikan kode program sesuai dengan objek dan. Buatlah Project dengan nama: khs.pjx 2. Buatlah Database. Angka yang sesuai dengan jenis tombol. Contoh jika angka 2. Program Biodata di Visual FoxPro.
In design mode, first make sure that Form Controls toolbar is visible with View â Form Controls Toolbar (Alt-V+F). In the toolbar, click on ActiveX Control (Ole Control).Draw a rectangle and at the completion, the program pops up a list of controls:
Right click on Properties and you can modifyproperties there. You might want to set AutoSize to True so that the barcode drew on the screen reflect the real size, not the rectangleyou just drew.
![Contoh Contoh](/uploads/1/2/7/5/127577638/250008768.jpg)
In order to display barcodes in reports, you need to do more. The nextsection explains how to add barcode in a report.
In order for the barcode to appear on a report, you need to embed itin the table with type General. Open Table Designer,add a field called
Barcode
, and set the typeto General.
In the design mode, first make sure that Report Controls Toolbar is visible with View â Report Controls Toolbar (Alt-V+o). In the toolbar, click on Picture/OLE Bound Control and draw a rectangle.
In the subsequent dialog, select Control source type as General field name. In the control source box,enter table1.Barcode. This is the field name that we created inthe first step. You may need to change it if you use a different table or fieldname.
![Contoh program dengan visual foxpro free Contoh program dengan visual foxpro free](http://pic.downloadastro.com/gallery/microsoft_visual_foxpro/install-microsoft-visual-foxpro-01.png)
Now we need to add code to initialize this control. Right click on thereport, and select Data Environment. In the DataEnvironment windows, right click and select Code... topop up the code window. Override BeforeOpenTables procedurein Object Dataenvironment.
The code is listed below for copy/paste:
If you are using Morovia Barcode ActiveX Professional, do not forgetto change this line:
to
Now save the work. click on Print Preview button to view the report. You may noticethe 'demo' text on the report because we created this example with trial version software.It won' appear if the full version software is installed.
An example project can be downloaded here.Note that this example usesBarcode ActiveX Lite. If you have Barcode ActiveX Professional installed instead,you need to change all references of Morovia.BarcodeLite to Morovia.BarcodeActiveX. As an alternative, you might downloada trial copy of Barcode Lite so that you can run this example project on yourcomputer.
© 2003-2020 Morovia Corporation. All rights reserved.