06-27-2024, 07:57 PM
Inspired by @grymmjack's comment about the fonts, I looked at "_LoadFont" in the wiki. The first example works, but I want that the output to return to the standard font at the end. Unfortunately, I get an error message with "_FreeFont"; I looked up what the error number says, but I don't know where the error is.
Can anyone tell me where the error is in the program? Thanks!
Can anyone tell me where the error is in the program? Thanks!
Code: (Select All)
'Fontuebung mit _LoadFont aus dem Wiki - 27. Juni 2024
Option _Explicit
Dim As String rootpath, fontfile, style
Dim As Long f
rootpath = Environ$("SYSTEMROOT") 'normally "C:\WINDOWS"
fontfile = rootpath + "\Fonts\cour.ttf" 'TTF file in Windows
style = "monospace" 'font style is not case sensitive
f = _LoadFont(fontfile, 30, style)
_Font f
Print "Hello!"
_FreeFont f
End