台湾“大选”马英九得票破700万自行宣布当选!
当前位置:金诺VB园文章教程系统文章 → 获得系统中的所有字体列表

获得系统中的所有字体列表

减小字体 增大字体 作者:佚名  来源:不详  发布时间:2008-1-29 22:19:00

获得系统中的所有字体列表
在Form1中加入一个ListBox,并在Form1中加入如下代码:
Private Sub Form_Load()
Dim counter As Integer

For counter = 0 To Screen.FontCount - 1
List1.AddItem Screen.Fonts(counter)
Next
End Sub

Private Sub List1_Click()
Static tempheight As Single

If tempheight = 0 Then tempheight = List1.Height
List1.Font.Name = List1.List(List1.ListIndex)
List1.Height = tempheight
End Sub