TextWinBackgrndColor Example

Using Programming Languages other than VBA

Sub Example_TextWinBackgrndColor()
	' This example returns the current setting of
	' TextWinBackgrndColor. It then changes the value, and finally
	' it resets the value back to the original setting.

	Dim preferences As AcadPreferences
	Dim currTextWinBackgrndColor As OLE_COLOR

	Set preferences = ThisDrawing.Application.preferences

	' Retrieve the current TextWinBackgrndColor value
	currTextWinBackgrndColor = preferences.DISPLAY.TextWinBackgrndColor
	MsgBox "The current value for TextWinBackgrndColor is " _
			& preferences.DISPLAY.TextWinBackgrndColor, vbInformation, "TextWinBackgrndColor Example"

	' Change the value for TextWinBackgrndColor
	preferences.DISPLAY.TextWinBackgrndColor = vbBlue
	MsgBox "The new value for TextWinBackgrndColor is " _
			& preferences.DISPLAY.TextWinBackgrndColor, vbInformation, "TextWinBackgrndColor Example"

	' Reset TextWinBackgrndColor to its original value
	preferences.DISPLAY.TextWinBackgrndColor = currTextWinBackgrndColor
	MsgBox "The TextWinBackgrndColor value is reset to " _
			& preferences.DISPLAY.TextWinBackgrndColor, vbInformation, "TextWinBackgrndColor Example"
End Sub

 

   Comments?