With a project's form open in design mode drag the Labels.NET Alabel1 component icon from the toolbox onto the form.
The component icon appears on the panel below the form – it does NOT appear on the form itself. The instance of the component will be given a default name (eg Alabel11) which appears in the properties panel when the component is selected. The name may be changed by the user by modifying the Name property within the Properties box.
The properties panel does not show properties (other than the name) because elements are added to the component, either programmatically or by using the built-in designer.
To display a label image on a form a PictureBox must be placed on the form and its Image must be generated using the Alabel11.ShowLabel(g) method, eg.
Sub
UpdateLabel()
Dim g as
Graphics=PictureBox1.CreateGraphics()
PictureBox1.Image=Alabel11.ShowLabel(g)
g.Dispose()
End
Sub
This routine needs to be called whenever the form requires refreshing, so is conveniently place in the Form_Paint() method, eg.
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
UpdateLabel()
End Sub
More: