在VB编写的记事本中如何编写其修改字体的程序
1个回答
展开全部
Private Sub mnufont_Click()
Dim sel As RichTextBox '不知道你用的是文本框还是富文本框...
Set sel = RichTextBox1
With CommonDialog1
.Flags = cdlCFBoth Or cdlCFEffects
.CancelError = False
.ShowFont
sel.SelFontName = .FontName
sel.SelFontSize = .FontSize
sel.SelBold = .FontBold
sel.SelCharOffset = .Color
sel.SelItalic = .FontItalic
sel.SelUnderline = .FontUnderline
sel.SelStrikeThru = .FontStrikethru
End With
End Sub
Dim sel As RichTextBox '不知道你用的是文本框还是富文本框...
Set sel = RichTextBox1
With CommonDialog1
.Flags = cdlCFBoth Or cdlCFEffects
.CancelError = False
.ShowFont
sel.SelFontName = .FontName
sel.SelFontSize = .FontSize
sel.SelBold = .FontBold
sel.SelCharOffset = .Color
sel.SelItalic = .FontItalic
sel.SelUnderline = .FontUnderline
sel.SelStrikeThru = .FontStrikethru
End With
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询