ArgumentException:参数在使用自定义字体时无效

时间:2019-01-28 13:11:03

标签: vb.net

Public Sub changefont(p As Panel)
    Try
        Dim pfc As New PrivateFontCollection()
        pfc.AddFontFile("fonts/droid.ttf")
        For Each ctrl As Control In p.Controls
            ctrl.Font = New Font(pfc.Families(0), 10)
        Next
    Catch ex As Exception

    End Try
End Sub

在每次加载表格时,我都使用changefont(panel1)

0 个答案:

没有答案