FutureBasic Logo

<<    Index    >> FutureBasic 5

system    ( some obsolete and unsupported - see last two tables )   function



Syntax:
systemInformation = system(whichInfo)

Description:
This function returns various kinds of information about the system and about the current application. Set whichInfo to one of the values shown here:
Note: the selectors removed in 5.7.104 now return zero and do nothing
whichInfoValueSystem(whichInfo) returns:
_scrnWidth6The width of the main monitor, in pixels.
_scrnHeight7The height of the main monitor, in pixels.
_sysVers8An integer representing the current System version number. For example, 761 represents version 7.6.1.
_aplActive9Returns a positive value if the current application is the active (foreground) process. Returns a negative value if the current application is in the background. Note that FutureBasic3 also generates a dialog event every time your application is moved to the foreground or to the background (see the Dialog function).
_crntDepth11Current color bit depth on the main monitor. Use the expression (2 ^ System(_crntDepth)) to get the actual number of available colors.


Note: The following system values/information were removed with FBtoC's introduction ( also see FBtoC Help ).
_lastCurs(0)0"CURS" resource ID number of the current cursor (if it is a resource)
_aplVol(1)1A working directory reference number for the folder that contains the application file.
_sysVol(2)2A working directory reference number for the System folder.
_cpuType(12)12A code indicating the machine's CPU type
_machType(13)13A code indicating the machine type.
_aplFlag(14)14System(_aplFlag) returns _false if the project was run and _zTrue if the project was built
_lastCursType(17)17This function may return 0 (plain), _themeCursorStatic or _themeCursorAnimate


Note: The following system values/information were removed in 5.7.104 because they no longer make sense or the underlying system call has been deprecated for a long time ( i.e. FreeMem() ) .
_memAvail5Number of free bytes currently available in the app's heap. Always returns a large value on OS X, because virtual memory is always available to fulfill any request for memory.
_macPlus3System(_macPlus) always returns 0.
_aplRes4Reference number for the Application file's resource fork .
_maxColors10Maximum color bit-depth available on the main monitor. Use the expression (2 ^ System(_maxColors)) to get the actual number of available colors.
_cpuSpeed (PPC only)15System(_cpuSpeed) returns the current clock speed (in megahertz) of the microprocessor.
_clockSpeed (PPC only)16System(_clockSpeed) returns the Gestalt clock speed (in megahertz) of the microprocessor.
_aplvRefNum (Appearance Manager)18This is the volume reference number of the running application. vRefNum usage is obsolete
_aplparID (Appearance Manager)19This is the volume parent ID number of the running application. parentID usage is obsolete

Some system-wide information can be obtained using the functions within the FB Headers, Util_FileManager.incl and Util_Workspace.incl.