|
-
Aug 14th, 2001, 05:59 AM
#1
Thread Starter
Addicted Member
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 !!!
B.S Computer Science
M.S Computer Engineering
-
Aug 15th, 2001, 05:04 AM
#2
doesn't it work if you put it in the rootdir of your application?
-
Aug 15th, 2001, 05:26 AM
#3
Thread Starter
Addicted Member
No it doesn't work !!!
Thanks anyway!!
B.S Computer Science
M.S Computer Engineering
-
Aug 16th, 2001, 05:00 PM
#4
Addicted Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|