Di bawah ini merupakan kode untuk menggunakan fonts tanpa harus menginstalnya.
READ MORE - Menggunakan Fonts Tanpa Menginstalnya
Private Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" ByVal lpFileName As String) As LongContoh penggunaan fungsi di atas:
Private Declare Function RemoveFontResource Lib "gdi32" Alias "RemoveFontResourceA" ByVal lpFileName As String) As Long
Public Function AddFontToResource(Filename As String)
Dim lFont As Long
lFont = RemoveFontResource(Filename)
End Function
Public Function RemoveFontFromResource(Filename As String)
Dim lFont As Long
lFont = AddFontResource(Filename)
End Function
Private Sub Form_Load()
AddFontResource App.Path & "\Fonts\Trado.ttf"
Text1.FontName = "Traditional Arabic"
End Sub