GefColorFormat.SystemColor (property)

Gets and sets the system color value of the color, if the Type of the GefColorFormat is cimColorSystemColor.
Syntax: GefSysColorEnum = object.SystemColor
object.SystemColor = GefSysColorEnum
Description: When set, also sets the Type to gefColorSystemColor.

When assign a system color to an object, the color may be different for different users, if their system colors are set differently.


Sub GefColorFormat_SystemColor()
    Dim oCimObj As GefObject
    Dim oCimBtnFmt As GefButtonFormat
    Dim oCimColorFmt As GefColorFormat
    Set oCimObj = CimGetObject
    Set oCimBtnFmt = oCimObj.ButtonFormat
    If Not oCimBtnFmt Is Nothing Then
        Set oCimColorFmt = oCimBtnFmt.FaceColor
        If Not oCimColorFmt Is Nothing Then
            oCimColorFmt.SystemColor = gefSysColorDesktop
            CimGetScreen.Refresh False
        End If
    End If
End Sub