SystemColors.ActiveCaption ?

  • Thread starter Thread starter Tony Maresca
  • Start date Start date
T

Tony Maresca

I would like to draw a gradient rectangle that uses
the same two colors that Windows uses to paint
the active caption bar.

ActiveCaption is one color. Does anyone know how
to find the color at the other end of the gradient?

--
Tony M.
 
Tony Maresca said:
I would like to draw a gradient rectangle that uses
the same two colors that Windows uses to paint
the active caption bar.

ActiveCaption is one color. Does anyone know how
to find the color at the other end of the gradient?

I don't know any ".Net" way to do this, but you can use P/Invoke to call the
WinApi function GetSysColor(COLOR_GRADIENTACTIVECAPTION). Unless you're
certain that the captions use gradients, you ought to check by calling the
Api function SystemParametersInfo passing the value SPI_GETGRADIENTCAPTIONS.
If you need more help I can supply some C++ code that does this - but I'm
not sure of the details of calling WinApi functions from .Net code.

Chris Jobson
 
Back
Top