Public Class Formulario_Fuente
Private Sub
chkcursiva_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
chkcursiva.CheckedChanged
If chkcursiva.Checked = True
And chknegrita.Checked = False And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = True And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic + FontStyle.Bold)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = False And
chksubrayada.Checked = True Then
Me.lbltexto.Font
= New System.Drawing.Font(lbltexto.Font,
FontStyle.Italic + FontStyle.Underline)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = True And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic + FontStyle.Bold
+ FontStyle.Underline)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = True And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Bold)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = False And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Underline)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = True And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Underline + FontStyle.Bold)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = False And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Regular)
End If
End Sub
Private Sub
chknegrita_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
chknegrita.CheckedChanged
If chkcursiva.Checked = False
And chknegrita.Checked = True And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Bold)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = True And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Bold + FontStyle.Italic)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = True And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic + FontStyle.Bold
+ FontStyle.Underline)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = True And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Bold + FontStyle.Underline)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = False And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = False And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Underline)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = False And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Underline + FontStyle.Italic)
Else
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Regular)
End If
End Sub
Private Sub
chksubrayada_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
chksubrayada.CheckedChanged
If chkcursiva.Checked = False
And chknegrita.Checked = False And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Underline)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = True And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Underline + FontStyle.Bold)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = False And chksubrayada.Checked
= True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Underline + FontStyle.Italic)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = False And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Regular)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = True And
chksubrayada.Checked = True Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic + FontStyle.Bold
+ FontStyle.Underline)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = False And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic)
ElseIf chkcursiva.Checked = False
And chknegrita.Checked = True And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Bold)
ElseIf chkcursiva.Checked = True
And chknegrita.Checked = True And
chksubrayada.Checked = False Then
Me.lbltexto.Font = New
System.Drawing.Font(lbltexto.Font, FontStyle.Italic + FontStyle.Bold)
End If
End Sub
Private Sub
cbocolor_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cbocolor.SelectedIndexChanged
Select Case Me.cbocolor.SelectedIndex
Case 0
Me.lbltexto.ForeColor() = Color.Red
Case 1
Me.lbltexto.ForeColor() = Color.Blue
Case 2
Me.lbltexto.ForeColor() = Color.Green
End Select
End Sub
Private Sub
btnsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
btnsalir.Click
Dim salida As Integer = MsgBox("Desea
Salir?",
MsgBoxStyle.YesNo + 32, "Mensaje
al usuario")
If salida = 6 Then
Me.Close()
End If
Principal.tsbffuente.CheckState = CheckState.Unchecked
End Sub
End Class