上一次 做了 字體改變應用程式

這次 多了 功能表 與 字體大小

需要
menustrip*1 label*1

程式碼 如下

Public Class Form1

Private Sub 文字大小ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 文字大小ToolStripMenuItem.Click

End Sub

Private Sub mniType1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniType1.Click
lblShow.Font = New Font("新細明體", lblShow.Font.Size, lblShow.Font.Style)
End Sub

Private Sub mniType2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniType2.Click
lblShow.Font = New Font("標偕體", lblShow.Font.Size, lblShow.Font.Style)
End Sub

Private Sub mniSize1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniSize1.Click
lblShow.Font = New Font(lblShow.Font.Name, 9, lblShow.Font.Style)
End Sub

Private Sub mniSize2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniSize2.Click
lblShow.Font = New Font(lblShow.Font.Name, 12, lblShow.Font.Style)
End Sub

Private Sub mniSize3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniSize3.Click
lblShow.Font = New Font(lblShow.Font.Name, 16, lblShow.Font.Style)
End Sub

Private Sub mniSize4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniSize4.Click
lblShow.Font = New Font(lblShow.Font.Name, 24, lblShow.Font.Style)
End Sub

Private Sub mniStyle1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniStyle1.Click
lblShow .Font = new Font (lblShow.Font.Name ,lblShow.Font.Size,fontstyle.Regular)
End Sub

Private Sub mniStyle2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniStyle2.Click
lblShow.Font = New Font(lblShow.Font.Name, lblShow.Font.Size, FontStyle.Bold)
End Sub

Private Sub mniStyle3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniStyle3.Click
lblShow.Font = New Font(lblShow.Font.Name, lblShow.Font.Size, FontStyle.Italic)
End Sub
End Class

完成後 如下圖

一些可自行調整!! ╭∩╮( ̄▽ ̄)╭∩╮

創作者介紹

↖Ι n V a D e R ╮

ip612256374 發表在 痞客邦 留言(0) 人氣()