|
-
May 23rd, 2007, 05:14 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Is there a way to check for a specific font?
Let's say I had an app which needed a specific font (which I do, in my case "small fonts") and I want to make it so that the program checks to see if this font is available on the target PC and, if not, bring up a msgbox with details of what font is needed and then terminate on clicking "EXIT" in the msgbox.
Is there any way of checking for a specific font in the system?
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
May 23rd, 2007, 05:17 PM
#2
Re: Is there a way to check for a specific font?
Why don't you simply install the font along with your application?
-
May 23rd, 2007, 05:23 PM
#3
Re: Is there a way to check for a specific font?
Code:
Dim i As Long
For i = 0 To Screen.FontCount - 1
Debug.Print i, Screen.Fonts(i)
Next
-
May 23rd, 2007, 05:23 PM
#4
Re: Is there a way to check for a specific font?
Use Screen.Fonts
Code:
Private Function FontExists(FontName As String) As Boolean
Dim strC As String, intLoop As Integer
strC = LCase$(FontName)
For intLoop = 0 To Screen.FontCount - 1
If LCase$(Screen.Fonts(intLoop)) = strC Then
FontExists = True
Exit For
End If
Next intLoop
End Function
-
May 23rd, 2007, 05:28 PM
#5
Thread Starter
PowerPoster
Re: Is there a way to check for a specific font?
That seems to work...thank you both! (rated, of course!)
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
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
|