|
TextWinBackgrndColor Пример |
Sub Example_TextWinBackgrndColor()
'Этот пример возвращает текущую установку TextWinBackgrndColor.
'Затем изменяет значение и наконец сбрасывает значение назад к оригинальной установке.
Dim preferences As AcadPreferences
Dim currTextWinBackgrndColor As OLE_COLOR
Set preferences = ThisDrawing.Application.preferences
'Получите текущее значение TextWinBackgrndColor
currTextWinBackgrndColor = preferences.DISPLAY.TextWinBackgrndColor
MsgBox "Текущее значение для TextWinBackgrndColor " _
& preferences.DISPLAY.TextWinBackgrndColor, vbInformation, "TextWinBackgrndColor Пример"
'Измените значение для TextWinBackgrndColor
preferences.DISPLAY.TextWinBackgrndColor = vbBlue
MsgBox "Новое значение для TextWinBackgrndColor " _
& preferences.DISPLAY.TextWinBackgrndColor, vbInformation, "TextWinBackgrndColor Пример"
'Сбросьте TextWinBackgrndColor к его оригинальному значению
preferences.DISPLAY.TextWinBackgrndColor = currTextWinBackgrndColor
MsgBox "Значение TextWinBackgrndColor сброшено к " _
& preferences.DISPLAY.TextWinBackgrndColor, vbInformation, "TextWinBackgrndColor Пример"
End Sub