首页 > 代码库 > 程序中互动控制字体大小

程序中互动控制字体大小

程序中互动控制字体大小

Dim showFontSize As Integer

Private Sub btnFontSizeUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFontSizeUp.Click
    With lblShowWords
           .Font = New System.Drawing.Font("宋体", showFontSize + 4)
     End With
     showFontSize = showFontSize + 4
End Sub

Private Sub btnFontSizeDown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFontSizeDown.Click
      With lblShowWords
          .Font = New System.Drawing.Font("宋体", showFontSize - 4)
      End With
      showFontSize = showFontSize - 4
End Sub

 

程序中互动控制字体大小