- Private Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String) As Long
- Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
-
- 'Se bout de code permet de se servire d'une police de caractere
- 'non implanter dans l'ordinateur
- 'RJLFRANCE 2003
-
- Private Sub Form_Load()
- npolice% = 0
- ttf$ = App.Path + "\" + "Smarc.ttf"
- npolice% = AddFontResource(ttf$)
- If npolice% > 0 Then
- v = SendMessage(hwnd_broacast, wm_fontchange, 0, 0)
- Else
- m% = MsgBox("Police non charger")
- End If
- Label1.FontName = "smartie caps" 'le nom réel de la police
- ' on le trouve avec un clic droit sur la fonte dans windows
- Label1.FontSize = "20" 'la taille
- End Sub
Private Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
'Se bout de code permet de se servire d'une police de caractere
'non implanter dans l'ordinateur
'RJLFRANCE 2003
Private Sub Form_Load()
npolice% = 0
ttf$ = App.Path + "\" + "Smarc.ttf"
npolice% = AddFontResource(ttf$)
If npolice% > 0 Then
v = SendMessage(hwnd_broacast, wm_fontchange, 0, 0)
Else
m% = MsgBox("Police non charger")
End If
Label1.FontName = "smartie caps" 'le nom réel de la police
' on le trouve avec un clic droit sur la fonte dans windows
Label1.FontSize = "20" 'la taille
End Sub