FieldSoftware
Home

-----------------------------

.NetCF: C#-VB.Net
 Software Developers


PrinterCE.NetCF SDK
   General Info
   Download & Install
   Purchase & Pricing
   Upgrade from PrinterCE

Getting Started with:
 
C#   -   VB.Net

  Code Examples

Documentation
  PrinterCE for .Net CF
  AsciiCE for .Net CF
  BarcodeCE for .Net CF

eVC (C/C++/MFC), eVB:
  PrinterCE SDK

-----------------------------

Software Developers
  PrinterCE SDK
  PrinterCE.NetCF SDK
  PocketHTMLprint SDK

Special Topics
  Supported Printers
  Bluetooth Printing
  Network Printing

Printing Utilities
  PrintPocketCE
  PIEprint
  PocketPixPrint
  PocketShot
 
PocketClipPrint

Arcade Games
  SockOut
  MazeCraze

Contact Info

BarcodeCE for .NetCF
Example:

Barcode Test

Demonstrates variety of bar codes supported by BarcodeCE for .Net CF

See full size printed output

BarcodeCE bcode = null;
try
{
  bcode =
new BarcodeCE(); //Create instance of BarcodeCE class
  bcode.SelectPrinter(
true);
  bcode.ScaleMode = BarcodeCE.MEASUREMENT_UNITS.INCHES;
 
double x, y, wid;
  y = 0;
  bcode.DrawText("---- UPC EAN13, EAN8 ----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawUPC("781572", "31856", "90000", 0, y,
true, BarcodeCE.TYPE_UPC.UPC_EAN13, 0, BarcodeCE.BARCODE_FIT.TIGHT);
  wid = bcode.DrawUPC("0123456", "", "", wid + 0.25, y,
true, BarcodeCE.TYPE_UPC.UPC_EAN8, 0, BarcodeCE.BARCODE_FIT.TIGHT);
  y = y + 0.75;
  bcode.DrawText("---- UPC : A+2, A, E+2, E ----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawUPC("25274", "79382", "02", 0, y,
true, BarcodeCE.TYPE_UPC.UPC_A, 0, BarcodeCE.BARCODE_FIT.TIGHT);
  x = wid + 0.25;
  wid = bcode.DrawUPC("24100", "16149", "", x, y,
true, BarcodeCE.TYPE_UPC.UPC_A, 0, BarcodeCE.BARCODE_FIT.TIGHT);
  x = x + wid + 0.25;
  wid = bcode.DrawUPC("123643", "", "02", x, y,
true, BarcodeCE.TYPE_UPC.UPC_E, 0, BarcodeCE.BARCODE_FIT.TIGHT);
  x = x + wid + 0.25;
  wid = bcode.DrawUPC("522361", "", "", x, y,
true, BarcodeCE.TYPE_UPC.UPC_E, 0, BarcodeCE.BARCODE_FIT.TIGHT);
  y = y + 0.75;
  bcode.DrawText("---- Code MSI Plessey: Mod1010, Mod1110, Mod10----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawMSI("987654", 0, y,
true, BarcodeCE.TYPE_MSI.MOD1010, BarcodeCE.BARCODE_FIT.TIGHT);
  x = wid + 0.25;
  wid = bcode.DrawMSI("987654", x, y,
true, BarcodeCE.TYPE_MSI.MOD1110, BarcodeCE.BARCODE_FIT.TIGHT);
  wid = bcode.DrawMSI("987654", x + wid + 0.25, y,
true, BarcodeCE.TYPE_MSI.MOD10, BarcodeCE.BARCODE_FIT.TIGHT);
  y = y + 0.6;
  bcode.DrawText("---- Code 93 : Base, Extend ----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawCode93("CODE 93", 0, y,
true, BarcodeCE.BARCODE_FIT.TIGHT, true);
  wid = bcode.DrawCode93("Extend 93", wid + 0.25, y,
true, BarcodeCE.BARCODE_FIT.TIGHT, true);
  y = y + 0.6;
  bcode.DrawText("---- Code 128 : Auto, Auto, UCC128 ----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawCode128("CODE 128", 0, y,
true, BarcodeCE.TYPE_128.AUTO, BarcodeCE.BARCODE_FIT.TIGHT);
  x = wid + 0.25;
  wid = bcode.DrawCode128("1234 abc", x, y,
true, BarcodeCE.TYPE_128.AUTO, BarcodeCE.BARCODE_FIT.TIGHT);
  wid = bcode.DrawCode128("0123456789012345678", x + wid + 0.25, y,
true, BarcodeCE.TYPE_128.UCC128, BarcodeCE.BARCODE_FIT.TIGHT);
  y = y + 0.75;
  bcode.DrawText("---- Codabar : Base & Checksum16 ----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawCodabar("a$123b", 0, y,
true, BarcodeCE.TYPE_CODABAR.BASE,BarcodeCE.BARCODE_FIT.TIGHT);
  x = wid + 0.25;
  wid = bcode.DrawCodabar("A123456B", wid + 0.25, y,
true, BarcodeCE.TYPE_CODABAR.CHECKSUM16, BarcodeCE.BARCODE_FIT.TIGHT);
  y = y + 0.6;
  bcode.DrawText("---- CODE 3 of 9 : Normal, Checksum, HIBC, Normal ----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawCode39("Extend39", 0, y,
true, BarcodeCE.TYPE_39.NORMAL, BarcodeCE.BARCODE_FIT.TIGHT, true);
  wid = bcode.DrawCode39("MOD43", wid + 0.25, y,
true, BarcodeCE.TYPE_39.CHECKSUM, BarcodeCE.BARCODE_FIT.TIGHT, false);
  y = y + 0.5;
  wid = bcode.DrawCode39("HIBC CODE", 0, y,
true, BarcodeCE.TYPE_39.HIBC, BarcodeCE.BARCODE_FIT.TIGHT, false);
  wid = bcode.DrawCode39("LIBRARY", wid + 0.25, y,
true, BarcodeCE.TYPE_39.NORMAL, BarcodeCE.BARCODE_FIT.TIGHT, false);
  y = y + 0.6;
  bcode.DrawText("---- CODE 2 of 5 : Base, Checksum ----", 0, y);
  y = y + 0.3;
  wid = bcode.Draw2of5("1991", 0, y,
true, BarcodeCE.TYPE_2of5.BASE, BarcodeCE.BARCODE_FIT.TIGHT);
  wid = bcode.Draw2of5("12345678", wid + 0.25, y,
true, BarcodeCE.TYPE_2of5.CHECKSUM, BarcodeCE.BARCODE_FIT.TIGHT);
  y = y + 0.6;
  bcode.DrawText("---- PostNet ----", 0, y);
  y = y + 0.3;
  wid = bcode.DrawPostnet("95709-9694", 0, y,
true);
  wid = bcode.DrawPostnet("94294-0894", wid + 0.25, y,
true);
  bcode.EndDoc();
//Done with this page - print it
}
catch (PrinterCEException exc)
{
 
if (bcode!=null)
  {
    bcode.ShutDown();
//Done - free PrinterCE resources
   
// NOTE: Only call ShutDown if PrinterCE instance is about to be destroyed.
  }
  bcode=
null;
  MessageBox.Show("BarcodeCE Exception","Exception");
}
finally
{
 
if (bcode!=null)
  {
    bcode.ShutDown();
//Done - free PrinterCE resources
   
// NOTE: Only call ShutDown if PrinterCE instance is about to be destroyed.
  }
  bcode=
null;
}