GraphicsWinBackgrndColor property example

Sub BackgroundColor_Example()
    ' This example returns the current settings
    ' of Model and Layout background colors
    Dim myPrefs As AcadPreferences
    Set myPrefs = ThisDrawing.Application.Preferences
    Dim currLayoutBGColor As OLE_COLOR
    Dim currModelBGColor As OLE_COLOR
    Set myPrefs = ThisDrawing.Application.Preferences
    ' Retrieve the current GraphicsWinLayoutBackgrndColor value
    currLayoutBGColor = myPrefs.Display.GraphicsWinLayoutBackgrndColor
    currModelBGColor = myPrefs.Display.GraphicsWinModelBackgrndColor
    Dim sBuf As String
    sBuf = "The current background color values are: "
    sBuf = sBuf & vbCrLf & "Model= " & currModelBGColor
    sBuf = sBuf & vbCrLf & "Layout= " & currLayoutBGColor
    MsgBox sBuf
End Sub

© Bricsys NV. All rights reserved.