Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2005

Tip: Looking for answers? Try searching our database.

SystemColors.ActiveCaption ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony Maresca - 11 Sep 2005 11:15 GMT
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?

Signature

Tony M.

Chris Jobson - 11 Sep 2005 15:19 GMT
>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
Lloyd Dupont - 12 Sep 2005 06:34 GMT
check out these articles on code project:
http://www.codeproject.com/cs/miscctrl/xp-style_button.asp
http://www.codeproject.com/vb/net/XPStyleB.asp

>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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.