BarCodeWiz Barcode ActiveX
Control
User Manual
 | Installation |
 | Quick Start |
 | Bar Code Types (Symbologies) |
 | Reference |
 | Properties |
 | Methods |
 | Events |
 | License |
|
Returns the image of the component (this is a read-only property, not available at design-time). You may use this property to output a bar code to printer.
Syntax
BarCodeWiz1.Picture
Visual Basic Examples
Example 1. Send a bar code image to your printer. It will print the bar code in the top left position on the page (0,0).
| Printer.PaintPicture BarCodeWiz1.Picture, 0, 0
|
Example 2. Set the Picture property of a PictureBox (named Picture1) to that of BarCodeWiz1.
| Picture1.Picture = BarCodeWiz1.Picture
|
Visual C++ Examples
Example 1. Retrieve the Picture property.
| CPicture pic = m_Wiz.GetPicture();
|
Example 2. Send a bar code image to your printer.
| CPrintDialog printdlog(FALSE);
|
| dc.Attach(printdlog.GetPrinterDC());
|
| memset(&docinfo,0,sizeof(docinfo));
|
| docinfo.cbSize = sizeof(DOCINFO);
|
| docinfo.lpszDocName = "barcodewiz"; // document name for the spooler
|
| if (dc.StartDoc(&docinfo) > 0)
|
| // Map Mode must be set after each StartPage().
|
| // Working with HiMetric units (1/100 of a mm)
|
| dc.SetMapMode(MM_HIMETRIC);
|
| CPicture pic = m_WizMain.GetPicture();
|
| long imageHeight = pic.GetHeight();
|
| long imageWidth = pic.GetWidth();
|
| // Remember that the vertical coordinates are reversed in MM_HIMETRIC
|
| dc.PlayMetaFile((HENHMETAFILE)pic.GetHandle(), rct);
|
| dc.EndDoc(); // Start printing
|
|