设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

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

1970-1-1 08:00| 发布者: 小鸟飞毛| 查看: 1463| 评论: 0

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


最新评论

相关分类

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-4-29 15:40 , Processed in 0.074324 second(s), 16 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回顶部