Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想确定系统颜色的 RGB 颜色,例如 SystemColors.HotTrack。
有没有办法在不使用 P/Invoke 和 GetSysColor(不包括绘制位图和检查像素值)的情况下做到这一点?
byte r = SystemColors.HotTrack.R; byte g = SystemColors.HotTrack.G; byte b = SystemColors.HotTrack.B;
或者
int argb = SystemColors.HotTrack.ToArgb();