Simon
Simon

Reputation: 25993

How do I get the widths of the borders drawn by ControlPaint?

I'm drawing a border with System.Windows.ControlPaint.DrawBorder3D, and want to draw into the rectangle inside the border. How do I get the width of the border, so that I can find the rectangle inside it?

UPDATE: With the default theme, the borders are 2px top and left, but only 1px bottom and right, so SystemInformation.Border3DSize isn't quite sufficient.

Upvotes: 2

Views: 217

Answers (1)

Xn0vv3r
Xn0vv3r

Reputation: 18184

may this two "friends" help you?

  • SystemInformation.Border3DSize.Height
  • SystemInformation.Border3DSize.Width

Upvotes: 3

Related Questions