
Originally Posted by
joe.szanyi
I want to make a macro or a custom button to change the background from black to white and white to black. I work in black but need to go to white for screen captures and then back to black to work. A button/macro would save considerable time. Any help woul be appreciated.
Seppy
Hi Seppy
Here is an example from ActiveX and VBA Reference Help file
Code:
Sub Example_GraphicsWinModelBackgrndColor()
' This example returns the current setting of
' GraphicsWinModelBackgrndColor. It then changes the value, and finally
' it resets the value back to the original setting.
Dim preferences As AcadPreferences
Dim currGraphicsWinModelBackgrndColor As OLE_COLOR
Set preferences = ThisDrawing.Application.preferences
' Retrieve the current GraphicsWinModelBackgrndColor value
currGraphicsWinModelBackgrndColor = preferences.Display.GraphicsWinModelBackgrndColor
MsgBox "The current value for GraphicsWinModelBackgrndColor is " _
& preferences.Display.GraphicsWinModelBackgrndColor, vbInformation, "GraphicsWinModelBackgrndColor Example"
' Change the value for GraphicsWinModelBackgrndColor
preferences.Display.GraphicsWinModelBackgrndColor = 16
MsgBox "The new value for GraphicsWinModelBackgrndColor is " _
& preferences.Display.GraphicsWinModelBackgrndColor, vbInformation, "GraphicsWinModelBackgrndColor Example"
' Reset GraphicsWinModelBackgrndColor to its original value
preferences.Display.GraphicsWinModelBackgrndColor = currGraphicsWinModelBackgrndColor
MsgBox "The GraphicsWinModelBackgrndColor value is reset to " _
& preferences.Display.GraphicsWinModelBackgrndColor, vbInformation, "GraphicsWinModelBackgrndColor Example"
End Sub
You need take a look at GraphicsWinLayoutBackgrndColor property
in this Help file also
Hth
~'J'~