System.Gestalt

From Xojo Documentation

Method


System.Gestalt(Code as String, ByRef CodeResult as Integer) As Boolean

Supported for all project types and targets.

Returns the characteristic of system specified by Code (Macintosh only). Returns a Boolean, which is True if successful.

Notes

See Gestalt Manager Reference on Apple's website.

Examples

This example gets the macOS version:

Dim major, minor, bug As Integer

If System.Gestalt("sys1", major) Then
If System.Gestalt("sys2", minor) Then
If System.Gestalt("sys3", bug) Then
MsgBox "macOS v" + Str(major) + "." + Str(minor) + "." + Str(bug)
End If
End If
End If