Access API集中營--增加臨時使用的字體
增加臨時使用的字體,代碼如下:
Option Compare Database
Option Explicit
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
Public Function AddFont(ByVal FontPath As String) As Boolean '增加字體
AddFont = AddFontResource(FontPath) = 1
End Function
Public Function RemoveFont(ByVal FontPath As String) As Boolean '刪除字體
RemoveFont = RemoveFontResource(FontPath) = 1
End Function
*********************************************************************
也許在你的應用程序中要臨時使用某種字體,以增強程序表現(xiàn)力。
舉例:
增加“天氣”字體
Debug.Print AddFont(CurrentProject.Path & "\Fonts\tianqi.TTF")
刪除“天氣”字體
Debug.Print RemoveFont(CurrentProject.Path & "\Fonts\tianqi.TTF")
(責任編輯:admin)
- ·API函數(shù)詳細解釋
- ·Access從剪切版里復制和粘貼數(shù)據(jù)
- ·Access利用api實現(xiàn)打開/關閉光驅
- ·應用程序開機自動啟動(注冊表操作技巧
- ·Access VBA 判斷網(wǎng)絡是否連通的多種辦
- ·什么是ADP,了解ADP的優(yōu)缺點
- ·優(yōu)秀產(chǎn)品大全--通用票據(jù)打印軟件(新)
- ·[技巧分享]多條Shell語句執(zhí)行導致判斷
- ·在access中可以調用API函數(shù)GetFileInfo
- ·Access API集中營--增加臨時使用的字體
- ·API ShellExecute 功能說明及應用示例
- ·在VB中使用API函數(shù)(什么是API? )
- ·API實現(xiàn)完美的圖片出現(xiàn)效果(轉)
- ·API 設置調整系統(tǒng)當前時間
- ·如何檢測以及設置鍵盤狀態(tài)
- ·不關閉當前數(shù)據(jù)庫COPY當前數(shù)據(jù)庫