From: "Chris Antos (Exchange)"
funny. yeah, i thought "windir" at first, but i'm running Win95 and there
is no...oops. i just missed it in the deluge of environment variables that
are set in my env. yes, "windir" is set for me, but so is "winbootdir". so
maybe "winbootdir" implies Win95.
//chris
-----Original Message-----
From: Jorj Strumolo [mailto:jorj@wsii.com]
Sent: Friday, April 03, 1998 9:20 AM
To: tsepro@semware.com
Subject: Re: Tse 2.5 and Windows
Andrea "Jackson" Casamurata asked:
AC> I'm using Tse 2.50e. How can I know if I'm running
> Tse under Windows (3.x) and not from plain Dos?
Chris Antos replies:
CA> Look for environment variable "winbootdir", all lower case.
> If it exists, you're running under Windows.
I think you mean "windir". At least using Win3.1 and TSE 2.5e
I don't have a "winbootdir" in my environment.
I run this test during of WhenLoaded() on startup:
public proc Border()
if Length(GetEnvStr("DV_")) VidBorder(42)
elseif Length(GetEnvStr("windir"))
or Length(GetEnvStr("_OS2")) VidBorder(56) Bright(1)
Set(CursorAttr,240) Set(CursorInBlockAttr,63)
else VidBorder(14) endif
end
it uses these as components
proc jBlinkBright()
if blink_bright==0 Bright(1) blink_bright=1
else Bright(0) blink_bright=0 endif
end
proc VidBorder(integer b)
register r
r.bx = b shl 8
r.ax = 1001h
Intr(10h,r)
end
Essentially, it checks for environment variables (that Windows
creates automatically, or that I have 4DOS create under OS/2 or
DESQview) to set the screen border to a reminder color, so that
I know not to do certain things that will lock up the computer
under those circumstances. It also changes the cursor line from
my normal black on white, which is fine full screen, to black on
bright white, which shows up better in smaller windows.
--
Jorj.Strumolo@chowda.com * Fido 1:323/140 * jorj@wsii.com
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|