Sunday, June 17, 2012

CommonDialog Font, Cara Menggunakannya

Private Sub Command1_Click()
With CommonDialog1
.CancelError = True
On Error GoTo ErrHandler
.Flags = cdlCFEffects Or cdlCFBoth
.ShowFont
Text1.Font.Name = .FontName
Text1.Font.Size = .FontSize
Text1.Font.Bold = .FontBold
Text1.Font.Italic = .FontItalic
Text1.Font.Underline = .FontUnderline
Text1.FontStrikethru = .FontStrikethru
Text1.ForeColor = .Color
End With
Exit Sub
ErrHandler:
Exit Sub
End Sub