How to Change Graphic Window Background?
How to Change Graphic Window Background?
(OP)
Does anyone know how to change the background color of the graphics window? By default it is a blue to white gradient. Is there an API call for this also? Thanks for any help!






RE: How to Change Graphic Window Background?
Regards,
Scott Baugh, CSWP
3DVision Technologies
www.3dvisiontech.com
www.scottjbaugh.com
FAQ731-376
FAQ559-716 - SW Fora Users
RE: How to Change Graphic Window Background?
RE: How to Change Graphic Window Background?
Regards,
Scott Baugh, CSWP
3DVision Technologies
www.3dvisiontech.com
www.scottjbaugh.com
FAQ731-376
FAQ559-716 - SW Fora Users
RE: How to Change Graphic Window Background?
swColorsGradientPartBackground
For Viewport Background the API Call is
swSystemColorsViewportBackground
For Top Gradient Color it is:
swSystemColorsTopGradientColor
For bottom color:
swSystemColorsBottomGradientColor
Hope this helps
regards
vik
RE: How to Change Graphic Window Background?
' ****************************************
' Viewport Background Toggle.swb
' ****************************************
Dim swApp As Object
Dim swDoc As Object
Dim nCurrentColor As Long
Sub main()
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
nCurrentColor = swApp.GetUserPreferenceIntegerValue(swSystemColorsViewportBackground)
'swApp.SendMsgToUser (nCurrentColor)
If nCurrentColor = 16777215 Then
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 14155261
Else
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 16777215
End If
swDoc.GraphicsRedraw2
End Sub
A simple modification can be made to the above in order to use the gradient feature.
Remember...
"If you don't use your head,
your going to have to use your feet."
RE: How to Change Graphic Window Background?
ht
Flores