Results 1 to 4 of 4

Thread: Fonts & VB

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Location
    Lost
    Posts
    216

    Talking 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

  2. #2
    pjvdg
    Guest
    doesn't it work if you put it in the rootdir of your application?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Location
    Lost
    Posts
    216

    Angry

    No it doesn't work !!!



    Thanks anyway!!
    B.S Computer Science
    M.S Computer Engineering

  4. #4
    Addicted Member
    Join Date
    Aug 2000
    Location
    Croatia
    Posts
    200
    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
  •  



Click Here to Expand Forum to Full Width