VB 6.0中怎样读取系统字体在列表框显示?

来源:百度知道 编辑:UC知道 时间:2024/09/23 09:07:16

添加一个列表框List1和一个按钮Command1。代码

Option Explicit

Private Sub Command1_Click()
Dim I As Integer
List1.Clear
For I = 0 To Screen.FontCount - 1
List1.AddItem Screen.Fonts(I)
Next
End Sub

'最好把List1的Sorted属性设置为True这样ListBox会自动排序。