Labels.NET component > Introduction

Viewing labels

Once a label has been designed one label image may be displayed by displaying the image returned from ShowLabel() method in a Windows Form PictureBox, e.g.

 

Dim g As Graphics = PictureBox1.CreateGraphics()

g.PageUnit = GraphicsUnit.Pixel

PictureBox1.Image = Alabel11.ShowLabel(g)

g.Dispose()

Alternatively a sheet of labels (ie. all the labels that will fit on one printer page) may be displayed by drawing the images returned from calling the doLabels() method until the eop (end of page) property becomes true.

 

Dim Im As Image

Dim x, y As Integer

Dim g As Graphics = Me.CreateGraphics()

g.PageUnit = GraphicsUnit.Pixel

Alabel11.setStart(0, 0, 0, 0,0)

While (Not Alabel11.eop)

    Im = Alabel11.doLabels(g, x, y)

    g.DrawImage(Im, x, y)

End While

g.Dispose()

 

 

More:

Printing labels