Dim i As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
i = i + 1
If i = 1 Then
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.Bold)
Else
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.Regular)
i = 0
End If
End Sub
上面的代码麻烦,用这种button1.font.bold.= not button1.font.bold纯手打,可能需要修改。