esempi di applicazione di proprietà varie a label

attivazione con click su pulsante

Private Sub CommandButton1_Click()
Label1.Accelerator = 10
Label1.AutoSize = True
Label1.BackColor = vbYellow
Label1.BackStyle = fmBackStyleOpaque
Label1.BorderColor = vbRed
Label1.BorderStyle = fmBorderStyleNone
Label1.Caption = "etichetta1:testo inserito con caption """
Label1.Enabled = True
Label1.Font = monaco
Label1.ForeColor = vbBlue
Label1.Height = 200
Label1.Left = 50
Label1.PicturePosition = fmPicturePositionLeftTop
Label1.SpecialEffect = fmSpecialEffectRaised
Label1.TabIndex = 1
Label1.Tag = "tag inserita"
Label1.TextAlign = fmTextAlignCenter
Label1.Top = 50
Label1.Visible = True
Label1.Width = 20
Label1.WordWrap = False
End Sub

 

attivazione con click su etichetta

Private Sub Label1_Click()
Label1.Accelerator = 10
Label1.AutoSize = True
Label1.BackColor = vbCyan
Label1.BackStyle = fmBackStyleOpaque
Label1.BorderColor = vbRed
Label1.BorderStyle = fmBorderStyleSingle
Label1.Caption = "etichetta1"
Label1.Enabled = True
Label1.Font = times
Label1.ForeColor = vbRed
Label1.Height = 100
Label1.Left = 10
Label1.PicturePosition = fmPicturePositionLeftTop
Label1.SpecialEffect = fmSpecialEffectSunken
Label1.TabIndex = 1
Label1.Tag = "tag inserita"
Label1.TextAlign = fmTextAlignRight
Label1.Top = 50
Label1.Visible = True
Label1.Width = 200
Label1.WordWrap = True
End Sub

 

attivazione con pulsante e messaggio descrittivo

Private Sub CommandButton2_Click()
Label1.Accelerator = 10
Label1.AutoSize = True
Label1.BackColor = vbYellow
Label1.BackStyle = fmBackStyleOpaque
Label1.BorderColor = vbRed
Label1.BorderStyle = fmBorderStyleNone
Label1.Caption = "etichetta1"
Label1.Enabled = True
Label1.Font = monaco
Label1.ForeColor = vbBlue
Label1.Height = 200
Label1.Left = 50
Label1.PicturePosition = fmPicturePositionLeftTop
Label1.SpecialEffect = fmSpecialEffectRaised
Label1.TabIndex = 1
Label1.Tag = "tag inserita"
Label1.TextAlign = fmTextAlignCenter
Label1.Top = 20
Label1.Visible = True
Label1.Width = 200
Label1.WordWrap = True
MsgBox "Label1.Accelerator " & Label1.Accelerator
MsgBox "Label1.AutoSize = True " & Label1.AutoSize
MsgBox "Label1.BackColor = vbyellow " & Label1.BackColor
MsgBox "Label1.BackStyle = fmBackStyleOpaque " & Label1.BackStyle
MsgBox "Label1.BorderColor = vbRed " & Label1.BorderColor
MsgBox "Label1.BorderStyle = fmBorderStyleSingle " & Label1.BorderStyle
MsgBox "Label1.Caption = etichetta1 " & Label1.Caption
MsgBox "Label1.Enabled = True " & Label1.Enabled
MsgBox "Label1.Font = monaco " & Label1.Font
MsgBox "Label1.ForeColor = vbblue " & Label1.ForeColor
MsgBox "Label1.Height = 100 " & Label1.Height
MsgBox "Label1.Left = 100 " & Label1.Left
MsgBox "Label1.PicturePosition = fmPicturePositionLeftTop " & Label1.PicturePosition
MsgBox "Label1.SpecialEffect = fmSpecialEffectSunken " & Label1.SpecialEffect
MsgBox "Label1.TabIndex = 1 " & Label1.TabIndex
MsgBox "Label1.Tag = tag inserita " & Label1.Tag
MsgBox "Label1.TextAlign = fmTextAlignRight " & Label1.TextAlign
MsgBox "Label1.Top = 50 " & Label1.Top
MsgBox "Label1.Visible = True " & Label1.Visible
MsgBox "Label1.Width = 200 " & Label1.Width
MsgBox "Label1.WordWrap = True " & Label1.WordWrap
End Sub

avanti