会员登录 - 用户注册 - 网站地图 Office中国(office-cn.net),专业Office论坛
当前位置:主页 > 技巧 > Access技巧 > 编程心得绝招 > 实际编程 > 正文

VBA自动安装和删除字体的代码

时间:2006-10-24 23:27 来源:Access开发者 作者:小鸟飞毛 阅读:
Private Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String) As Long
Private Declare Function RemoveFontResource Lib "gdi32" Alias "RemoveFontResourceA" (ByVal lpFileName As String) As Long

Private Sub Command1_Click() '增加字体
Dim lResult As Long
lResult = AddFontResource("c:\myApp\myFont.ttf")
End Sub
Private Sub Command2_Click() '删除字体
Dim lResult As Long
lResult = RemoveFontResource("c:\myApp\myFont.ttf")
End Sub


(责任编辑:admin)

顶一下
(0)
0%
踩一下
(0)
0%
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价: