How to draw a 3D border using visual styles?

I can draw a 3D border using ControlPaint.DrawBorder3D, but I get a Windows Classic 3D border. I want to draw the current border of the 3D theme - in the default XP theme, it is 1px blue or gray border. How to do it and how to get its width?

+3
source share
2 answers

It looks like you might need to look at System.Windows.Forms.VisualStyles.VisualStyleRenderer :

System.Windows.Forms.VisualStyles VisualStyleElement, (UI) , . , a VisualStyleRenderer , .

, DrawBackground. VisualStyleRenderer , GetColor GetEnumValue, , .

.

, VisualStyleElement.Window.Caption.Active, ( ), VisualStyleElement.Window.FrameBottom.Active. VisualStyleElement.Window, , , .

+4

.NET Framework 2.0

, , , XP. , , Button. ?

. UxTheme.dll. . - # DLL, . , , , , .

+1

Source: https://habr.com/ru/post/1703562/


All Articles