font exists

Posted on March 14th, 2009 in Visual Basic by admin

Public Function FontExists(FontName As String) As Boolean
Dim oFont As New StdFont
Dim bAns As Boolean
oFont.Name = FontName
bAns = StrComp(FontName, oFont.Name, vbTextCompare) = 0
FontExists = bAns
End Function

Private Sub Form_Load()
MsgBox FontExists(”ARIAL”)
End Sub

Related posts:

  1. active window title Private Declare Function GetForegroundWindow Lib “user32″ () As Long Private...

Related posts brought to you by Yet Another Related Posts Plugin.

Post a comment