-
Fonts & VB
If i have a font X and all i know about this X is the real filename.
for example "c:\temp\something.ttf"
The question is : how can i use this font X in my program without moving
the font filename to WINDIR\Fonts\ ????
(I want to use X in labels, textboxes, forms ..........)
Maybe we can make a temp shortcut to this X into the WINDIR\Fonts\ !?!?!?
Thanks anyway !!!
-
doesn't it work if you put it in the rootdir of your application?
-
No it doesn't work !!!
Thanks anyway!!
-
This is very simple. Use the AddFontResource API to add a custom font to a system font table. When your app closes or when you don't need the font anymore use the RemoveFontResource to remove the font from the table.
BTW: When you restart your computer, all fonts added this way will be removed from the font table.