Delphi programming to get the system interface color

Source: Internet
Author: User

The production process, by Windows interface color Dizzy, design is a color, color collocation is very good, but to the user hand font is not clear, seriously affected the program effect, so the combination of operating system color will be used to make users happy with the rare steps:

The following is a list of the operating system interface of the name, to obtain the system color, the parameters can be changed.

COLOR_SCROLLBAR      滚动条
COLOR_BACKGROUND      桌面背景
COLOR_ACTIVECAPTION     活动窗口标题
COLOR_INACTIVECAPTION   非活动窗口标题
COLOR_MENU         菜单
COLOR_WINDOW        窗口背景
COLOR_WINDOWFRAME     窗口框
COLOR_MENUTEXT       窗口文字
COLOR_WINDOWTEXT      3D 阴影 (Win95)
COLOR_CAPTIONTEXT     标题文字
COLOR_ACTIVEBORDER     活动窗口边框
COLOR_INACTIVEBORDER    非活动窗口边框
COLOR_APPWORKSPACE     MDI 窗口背景
COLOR_HIGHLIGHT      选择条背景
COLOR_HIGHLIGHTTEXT    选择条文字
COLOR_BTNFACE       按钮
COLOR_BTNSHADOW      3D 按钮阴影
COLOR_GRAYTEXT       灰度文字
COLOR_BTNTEXT       按钮文字
COLOR_INACTIVECAPTIONTEXT 非活动窗口文字
COLOR_BTNHIGHLIGHT     3D 选择按钮}
var i:integer;
begin
//取得活动窗口标题颜色
i :=GetSysColor(COLOR_ACTIVECAPTION);
Label1.Caption:=颜色代码为:+IntTostr(i);
end;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.