- ·上一篇文章:如何关闭一个程序
- ·下一篇文章:VB控件控制面板中的各种选项
获得系统中的所有字体列表
获得系统中的所有字体列表
在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

