|
|
|
|
|
|
|
How to display barcode images onto Pocket PC, Windows CE and Windows Mobile forms
Prerequisites
- Neodynamic Barcode Professional for .NET Compact Framework
- Microsoft .NET Compact Framework 2.0 (or greater)
- Microsoft Visual Studio 2005 (or greater)
|
This walkthrough illustrates how to easily display linear (1D) and 2D barcode images onto Smart Device forms in Pocket PC, Smartphone, Windows CE and Windows Mobile projects leveraging .NET Compact Framework technologies.
During the course of this walkthrough, you will accomplish the following activities:
Display directly barcode images onto a form by using Barcode Professional UI controls
Follow these steps:
- Install Barcode Professional for .NET Compact Framework and configure it in Visual Studio 2005 as is described in the "Getting Started > Visual Studio Configuration" topic in the product help.
- Open Visual Studio 2005 and create a new Smart Device project such as Pocket PC 2003
-
Displaying Linear (1D) barcodes, for example Code 128
- Open Visual Studio Toolbox and drag & drop the Barcode1D control as is shown in the following figure:
- Specify the Linear (1D) barcode Symbology/standard you want to use by setting up the Symbology property of Barcode1D control just dropped onto the form. For example the following figure shows the setting for encoding Code128
- The value to encode is specified by setting up the Code property of Barcode1D control and by default it's "123456789"
- The Text property of Barcode1D control can be used to add additional text you want to draw on the barcode image. Example, you could set it to "Employee ID"
- Barcode related dimensions are specified by setting properties like BarHeight, BarWidth, BarRatio, etc (all dimension values are measured and must be specified in inches). IMPORTANT: Please refer to the Barcode Professional help for more information about the settings for each standard. Look for "Barcode Symbology Information Center" topic.
- (Optional) All the settings can be made by writing code in your preferred .NET language such as VB.NET or C#. For example, you could specify all settings in the Form_Load event procedure like follows:
Visual Basic .NET
Visual C# .NET
- That's it. Build your project and test it. You should get something like follows:
- Displaying 2D barcodes, for example Data Matrix
- Open Visual Studio Toolbox and drag & drop the Barcode2D control as is shown in the following figure:
- Specify the 2D barcode Symbology/standard you want to use by setting up the Symbology property of Barcode2D control just dropped onto the form. For example the following figure shows the setting for encoding DataMatrix
- The value to encode is specified by setting up the Code property of Barcode2D control and by default it's "123456789". Notice that Code property is not displayed in 2D barcode symbologies!
- The Text property of Barcode2D control can be used to add additional text you want to draw on the barcode image. Example, you could set it to "Card ID"
- Barcode related dimensions are specified by setting properties like DataMatrixModuleSize, BarHeight, BarWidth, BarRatio, etc (all dimension values are measured and must be specified in inches). IMPORTANT: Please refer to the Barcode Professional help for more information about the settings for each standard. Look for "Barcode Symbology Information Center" topic.
- (Optional) All the settings can be made by writing code in your preferred .NET language such as VB.NET or C#. For example, you could specify all settings in the Form_Load event procedure like follows:
Visual Basic .NET
Visual C# .NET
- That's it. Build your project and test it. You should get something like follows:
Generate barcode images by using Barcode Professional classes and then display them onto a form by using a PictureBox control
Follow these steps:
- Install Barcode Professional for .NET Compact Framework.
- Open Visual Studio 2005 and create a new Smart Device project such as Pocket PC 2003
-
Displaying Linear (1D) barcodes, for example Code 128
- Open Visual Studio Toolbox and drag & drop a PictureBox control and set its SizeMode property to CenterImage
- Add a reference to Neodynamic.CF.Barcode1D.dll assembly
- In the Form_Load event procedure of the form, write the following sample code which instantiates Barcode1D class and generates a Code 128 barcode image to be displayed in the PictureBox control.
Visual Basic .NET
Visual C# .NET
- That's it. Build your project and test it. You should get the barcode image displayed in PictureBox control.
- Displaying 2D barcodes, for example Data Matrix
- Open Visual Studio Toolbox and drag & drop a PictureBox control and set its SizeMode property to CenterImage
- Add a reference to Neodynamic.CF.Barcode2D.dll assembly
- In the Form_Load event procedure of the form, write the following sample code which instantiates Barcode2D class and generates a Data Matrix barcode image to be displayed in the PictureBox control.
Visual Basic .NET
Visual C# .NET
If you need more information or assistance, please contact our
.
|
|
|
|
|
|
|