I have a strange problem occurring that I cannot find an answer for when
working with a Font object in my VB6 app.
here is the code in a function with a boolean return type;
_________________________________________________
Dim oFont As New StdFont
On Error Resume Next
Set oFont = New StdFont
With oFont
.name = Trim$(sFontName)
End With
'oFont.name = sFontName
' Check to see whether the font name passed in was valid by seeing
' if the property got set.
IsFontSupported = (UCase$(oFont.name) = UCase$(sFontName))
' Whatever happens, return a valid font name in this ByRef parameter.
sFontName = oFont.name
err.Clear
_________________________________________________
The problem is that when I set the font with the passed in variable, it
changes from its default of 'MS San Serif' to 'Arial', when the variable
contained "Veranda".
I verified that the Veranda font exists, so I am not sure what would cause
the object to do this?
Any help is appreciated.
|