ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
WNWillem Nagels21/02/2020

I'm trying to create a macro that switches from my blue gradient background to plain white and back.

It also has to set the right color for the top and bottom (when set to gradient).

I started with the part that sets the right colors, and i will later add and if-statement to toggle from gradient to white.


Dim swApp As SldWorks.SldWorks

Sub main()
Set swApp = Application.SldWorks


swApp.SetUserPreferenceIntegerValue swSystemColorsTopGradientColor, ???
swApp.SetUserPreferenceIntegerValue swSystemColorsBottomGradientColor, ???


End Sub

This code will change the colors, I just don't know what numbers I should use for the colors. It isn't just rgb numbers?

I tried some numbers, and I've seen some real interesting colors...

How to find out the color codes of my blue background?