日期:2014-05-18 浏览次数:21350 次
System.Drawing.Text.PrivateFontCollection fc = new System.Drawing.Text.PrivateFontCollection(); fc.AddFontFile("1.ttf"); //同目录下字体文件 System.Drawing.Font font = new Font(fc.Families[0],30);
------解决方案--------------------
要把字体放到bin文件下。
------解决方案--------------------
Public Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String) As Long
Public Declare Function RemoveFontResource Lib "gdi32" Alias "RemoveFontResourceA" (ByVal lpFileName As String) As Long