by Josip Bugarcic (3 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 23rd February 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Using Fonts Without Installing
API Declarations
Declare Function RemoveFontResource Lib "gdi32" Alias "RemoveFontResourceA" (ByVal lpFileName As String) As Long
'you will be able to use it also in other programs
'until You restart the machine or remove the font
Dim lFont As Long
lFont = AddFontResource("c:\somefont.ttf")
'if You want to remove font
Dim lFont As Long
lFont = RemoveFontResource("c:\somefont.ttf")