INTRODUCTION

SCMLlabelPrinter is an ActiveX DLL that allows Visual Basic programmers to print and preview labels. It has been made with VB6 (sp3).

Print/Preview technology is provided by Software with Brains, Inc.
www.softwarewithbrains.com.


SCMLlabelPrinter has the following features:

It can print any labels for ink-jet and laser printers. 
To save label sheets, printing can begin at a specified location. 
You can choose any font and font style on your system. 
You can print your data using a user-defined type (UDT). 
Your can print your data from a DAO recordset. 
SAMPLE PROJECT

PROPERTIES:

adjustHeight 
adjustLeft 
FontSize 
FontStyle 
Grid 
LabelCode 
LabelFont 
LabelsRemaining 
PrintArea 
PrintPreview 
METHODS:

PrintLabel 
PrintLabelRS 
PrintLabelX 
PrintLabelXRS 
PrintONElabel 
PrintONElabelX 
 

www.scmlsoftware.com

 

To order or for questions and comments:

scmlsoftware@globetrotter.net
================================
adjustHeight:

object.adjustHeight [= number]

Allows you to fine tune the vertical position of the label's first line.

 

type: double

access: read/write

example:

object.adjustHeight = 0.2

================================
adjustLeft:

object.adjustLeft [= number]

Allows you to fine tune the left position of the text in the label.

 

type: double

access: read/write

 

example:

object.adjustLeft = 0.125

================================
FontSize:

object.FontSize[= number]

Sets and retrieves the font size of the labels.

 

type: integer

access: read/write

 

example:

object.FontSize = 12

===============================
FontStyle:

object.FontStyle =

fBOLD = 1
fUNDERLINED = 2
fITALIC = 4
fNORMAL = 0

Sets and retrieves the font style of the labels.

 

access: read/write

 

example:

object.FontStyle = fBOLD

These can be combined with the "or" operator:

object.FontStyle = fBOLD or fITALIC

=========================
Grid:

object.Grid [= boolean]

Displays the grid of the labels page. This allows you to check if the text in the labels is correctly positioned before printing.

 

access: read/write

 

example:

object.Grid = True

====================
LabelCode:

object.LabelCode = 

This is the Avery code of the label you want to use. You select one in the following list that will appear (if the code for your label is not in this list, you will be able to use the PrintLabelX method to pass the dimensions of your label):

code2160_Mini_Address 
code2163_Mini_Shipping 
code5162_Address 
code5167_Shipping_Address 
code5196_Diskette 
code5198_Audio_Tape
code5199F_Video_Face 
code5199S_Video_Back 
code5667_Shipping_Address 
code5766_Folder 
code5883_Badge 
code8366_Folder 
code8371_Business_Card 

access: read/write

 

example:

object.LabelCode = code5162_Address

=============================
LabelFont:

object.LabelFont [= string]

Sets or returns the name of the font you want to use.

 

type: string

access: read/write

 

example:

object.LabelFont = "Times New Roman"

=================================
LabelsRemaining:

object.LabelsRemaining [= number]

If some labels have been used on the page, this allows you to begin printing at the first available label (determined by the number of labels remaining on the page).

 

type: integer

access: read/write

 

example:

object.LabelsRemaining = 10

=================================
PrintArea:

object.PrintArea [= number]

Use this property if your printer has a non-printable area (vertical). Check your printer's manual and do some tests on plain paper.

 

type: double

access: read/write

 

example:

object.PrintArea = 0.125

====================================
PrintPreview:

object.PrintPreview [= boolean]

Displays the pages before printing.

 

access: read/write

 

example:

object.PrintPreview = True

====================================
PrintLabel:

object.PrintLabel (ByVal UDT As Variant)

This method will print the contents of a user-defined type. User-defined data types can contain one or more elements of a data type, an array, or a previously defined user-defined type.

In this component there is a built-in user-defined type (UDT) called "info" which has
up to 15 members named info1, info2,..., info15 of data type string.


 

example:

object.LabelFont = "arial"
object.FontStyle = fITALIC
object.FontSize = 11
object.LabelCode = code5162_Address
object.Grid = True
object.PrintLabel infogen()

=======================================
PrintLabelRS:

object.PrintLabelRS (rs As DAO.Recordset)

This method will print the contents of a DAO recordset.

 

example:

object.LabelFont = "arial"
object.FontStyle = fITALIC
object.FontSize = 11
object.LabelCode = code5162_Address
object.Grid = True


object.PrintLabelRS rsLBL
or
object.PrintLabelRS Data1.Recordset

===================================
PrintLabelX:

object.PrintLabelX (TopMargin As Double, SideMargin As Double, VertPitch As Double, HorPitch As Double, _
Height As Double, Width As Double, NumberAcross As Integer, NumberDown As Integer, ByVal UDT As Variant)

Use this method to print labels that are not listed in this component. If you have the code for your label, you can use Microsoft Word, for example, to determine the dimensions of your label by going in the "Details" section for labels.

The data to be printed is in a user-defined type (UDT). In this component there is a built-in user-defined type (UDT) called "info" which has up to 15 members named info1, info2,..., info15 of data type string.

You must specify the dimensions.


object.adjustHeight = 0.2
object.adjustLeft = 0.5
object.Grid = True
object.PrintLabelX 0.83, 0.16, 1.33, 4.19, 1.33, 4, 2, 7, infogen()


===============================
PrintLabelXRS:

object.PrintLabelXRS (TopMargin As Double, SideMargin As Double, VertPitch As Double, HorPitch As Double, _
Height As Double, Width As Double, NumberAcross As Integer, NumberDown As Integer, rs As DAO.Recordset)

Use this method to print labels that are not listed in this component. If you have the code for your label, you can use Microsoft Word, for example, to determine the dimensions of your label by going in the "Details" section for labels.

The data to be printed is a DAO recordset. You must specify the dimensions.
See figure1

example:

object.Grid = True
object.PrintLabelXRS 0.83, 0.16, 1.33, 4.19, 1.33, 4, 2, 7, rsLBL

====================================
PrintONElabel:

object.PrintONElabel (LabelNumber As Integer, Text1 As String, Optional Text2 As String, Optional text3 As String, Optional text4 As String, Optional text5 As String, Optional text6 As String, _

Optional text7 As String, Optional text8 As String, Optional text9 As String, Optional text10 As String, Optional text11 As String, Optional text12 As String)

This method will print only one label whose code appears in the included list at the position specified by LabelNumber

example:

object.LabelCode = code5167_Shipping_Address
object.Grid = True
object.PrintONElabel 5, "Hello1", "Hello2"

===========================================
PrintONElabelX:

object.PrintONElabelX (LabelNumber As Integer, TopMargin As Double, SideMargin As Double, VertPitch As Double, HorPitch As Double, _
Height As Double, Width As Double, NumberAcross As Integer, NumberDown As Integer, Text1 As String, Optional Text2 As String, Optional text3 As String, Optional text4 As String, Optional text5 As String, Optional text6 As String, _
Optional text7 As String, Optional text8 As String, Optional text9 As String, Optional text10 As String, Optional text11 As String, Optional text12 As String)

This method requires one string and can have up to 12 strings.

This method will print only one label (not listed) at the position specified by LabelNumber. You must specify the dimensions.
See figure1

example:

object.FontStyle = fNORMAL
object.Grid = True
object.PrintONElabelX 5, 0.5, 1.34, 0.67, 5.81, 0.67, 5.81, 1, 15, "Hello"


=============================

www.scmlsoftware.com

 

To order or for questions and comments:

scmlsoftware@globetrotter.net














