BLOG.CSHARPHELPER.COM: Draw 2D or 3D borders in C#
Draw 2D or 3D borders in C#
The DrawBorder subroutine draws a border inside the edges of a Rectangle. If the border_style parameter is FixedSingle, the code subtracts 1 from the Rectangle's width and height so the border lies just inside the Rectangle and then draws the Rectangle as a flat, 2D border.
If border_style is Fixed3D, the code checks the sunken parameter and initializes an array to the system colors it should use for the different parts of the border. It then uses the Graphics object's DrawLine method to draw the border.
Comments