level 1
彡小D丿
楼主
Private Sub tBold_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tBold.Click
If TextBox1.Font.Bold Then
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Regular)
ElseIf TextBox1.Font.Bold + Font.Italic Then
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Italic)
ElseIf TextBox1.Font.Italic Then
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Italic + FontStyle.Bold)
Else
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Bold)
End If
tBold.Checked = True
tBold.Checked = False
End Sub
End Class
我这段代码有什么不足? 测试时 粗斜体不是变为斜体。而是会变为常规
2016年12月30日 06点12分
1
If TextBox1.Font.Bold Then
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Regular)
ElseIf TextBox1.Font.Bold + Font.Italic Then
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Italic)
ElseIf TextBox1.Font.Italic Then
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Italic + FontStyle.Bold)
Else
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Bold)
End If
tBold.Checked = True
tBold.Checked = False
End Sub
End Class
我这段代码有什么不足? 测试时 粗斜体不是变为斜体。而是会变为常规

