Is it possible to install an available font in VB?
EDIT: This is going to be in Windows only... I'm still a beginner, so I didn't put it in the Windows forum... I think I've seen one...
Install Font?
one possibility. I think: Better is
Code: Select all
Procedure LoadAdditionalFont(File$)
AddFontResource_(File$)
;SendMessage_(#HWND_BROADCAST,#WM_FONTCHANGE,0,0)
EndProcedure
Procedure UnLoadAdditionalFont(FontName$); NOT FILENAME!
RemoveFontResource_(FontName$)
;SendMessage_(#HWND_BROADCAST,#WM_FONTCHANGE,0,0)
EndProcedure
For games: The better solutions. Maybe you need a "crazy" Font, but this font isn't usefull for word and co.thefool wrote:My method works, but with gpi's method you can have the font installed and the uninstalled again, while its in your own decided path.
And RPGMaker 2K shows, that the "global" methode with the font-folder isn't the best. Every RPGMaker-Game must use the same font...
btw: Don't take fixed path for the font-folder. There exist API-Commands to find the folder (a Windows can also installed on z:\windows\)
GPI
the problem is: Where is the windows-folder, and how it is "called".thefool wrote:@gpi: if i meant it to be windows\font i would have written "windows\font"
Withouth quotes i was pointing to the dir where windows is installed, and not an absolute path..
On win98 you can rename the folder without any problem. But there exit api-commands (search in the forum), to find the right pfad.
btw.: My "c:\program files\common files" is called "c:\Programme\Gemeinsame Dateien" (i use a german windows-version).
So: ALWAYS search a system-folder with api-commands!