Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  

SystemInfo.WinSystemMetrics

Retrieves the specified system metric or system configuration setting.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
SystemInfo 6.3 No Yes Yes, Windows only No No

MBS( "SystemInfo.WinSystemMetrics"; ID )

Parameters

Parameter Description Example value
ID The ID of the value to query.
Can be the name of the value without SM_ prefix like "CMONITORS" or the numeric value like 80.
"CMONITORS"

Result

Returns value or error.

Description

Retrieves the specified system metric or system configuration setting.
Note that all dimensions retrieved by GetSystemMetrics are in pixels.

Please see Microsoft website for all the possible parameters and return values:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx

Values for Digitizer query:

NameValueMeaning
NID_INTEGRATED_TOUCH1The device has an integrated touch digitizer.
NID_EXTERNAL_TOUCH2The device has an external touch digitizer.
NID_INTEGRATED_PEN4The device has an integrated pen digitizer.
NID_EXTERNAL_PEN8The device has an external pen digitizer.
NID_MULTI_INPUT64The device supports multiple sources of digitizer input.
NID_READY128The device is ready to receive digitizer input.

Examples

Query number of display monitors on a desktop.

MBS( "SystemInfo.WinSystemMetrics"; "CMONITORS")

Example result: 1

Query size of screen:

MBS( "SystemInfo.WinSystemMetrics"; "CXScreen")
& " x " &
MBS( "SystemInfo.WinSystemMetrics"; "CYScreen")

Example result: 1280 x 768

Query whether we are shutton down:

# Returns 1 if FileMaker Window Close Script Trigger was called due to shutdown
MBS( "SystemInfo.WinSystemMetrics"; "SHUTTINGDOWN")

Example result: 0

Query whether system is a Tablet PC:

MBS( "SystemInfo.WinSystemMetrics"; "TabletPC")

Example result: 1

Query whether we are in slate mode:

# Returns 0 for slate mode, else non-zero
MBS( "SystemInfo.WinSystemMetrics"; "ConvertibleSlateMode")

Example result: 0

Query whether mouse is installed:

MBS( "SystemInfo.WinSystemMetrics"; "MousePresent")

Example result: 1

Query whether a mouse wheel is present:

MBS( "SystemInfo.WinSystemMetrics"; "MouseWheelPresent")

Example result: 1

Query whether we have a digitizer

# Nonzero if the current operating system is Windows 7 or Windows Server 2008 R2 and the Tablet PC Input service is started; otherwise, 0.
# The return value is a bitmask that specifies the type of digitizer input supported by the device.
# e.g. 193 for a ready touch device with multi touch.
MBS( "SystemInfo.WinSystemMetrics"; "Digitizer")

Example result: 193


SystemInfo.WinSuiteMask   -   SystemInfo.WindowsAero

Feedback: Report problem or ask question.




Links
MBS FileMaker tutorial videos