Font Problem

BlitzPlus Forums/BlitzPlus Programming/Font Problem

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

So... What -is- the Fix for XP?

The example mentioned above works without problems on windows 2000, but I currently don't have access to either Win98 or XP.

However, if there is a definite way to make it work under Win98 as well as XP, at least it won't be the end of the world: I don't remember who wrote it, but I ran across the following code a while ago:

; Userlib declaration 
;.lib "Kernel32.dll" 
;GetVersionEx%(VersionInfo*):"GetVersionExA" 

; Blitz code for querying platform
Version = CreateBank(148)
PokeInt(Version, 0, BankSize(Version))

If GetVersionEx(Version) Then
	Select PeekInt(Version, 16)
		Case 0 : Notify "You are running Windows 3.1"
		Case 1 : Notify "You are running on the Windows 9x kernel"
		Case 2 : Notify "You are running on the Windows NT kernel"
		Default : Notify "Unexpected value for Platform ID.", True
	End Select
Else
	Notify "There was an error querying version info.", True

EndIf


Or more detailed, without userlibs:

OS$=GetEnv("OS")
root$=GetEnv("systemroot")
appdata$=GetEnv("AppData")
If OS$="Windows_NT" then print "You are running the Windows NT kernel"

If OS$="Windows_NT" And (Instr(root$,"WINNT")<>0) And AppData$<>"" Then Print "Probably Windows 2000"
If OS$="Windows_NT" And (Instr(root$,"WINDOWS")<>0) And AppData<>"" Then Print "Probably Windows XP or Windows 2003"
If OS$="Windows_NT" And AppData$="" Then Print "Probably Windows NT"
If OS$="" Then Print "Windows 9x"