CodeItBetter Programming Another VB Programming Blog

How to Add/Remove new Font

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'Fonts - How to Add/Remove new Font

Declare Function AddFontResource& Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String)
Declare Function RemoveFontResource& Lib "gdi32" Alias "RemoveFontResourceA" (ByVal lpFileName As String)
 
Private Sub Command1_Click()
    Call RemoveFontResource("C:\Temp\Carolina.ttf")
End Sub
 
Private Sub Form_Load()
    Command1.Caption = "Remove"
    retvalue = AddFontResource("C:\Temp\Carolina.ttf")
    Command1.FontName = "Carolina"
End Sub
Filed under: Fonts Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.