Elongated Buttons, Rounded cornered Groupboxes and Labels of Trapeziums Shaped






3.77/5 (29 votes)
Dec 5, 2003

92113

4528
This article shows how to create elongated buttons, rounded cornered groupboxes and labels of trapezium shape
Introduction
This is a article as to how to create buttons, groupboxes and labels of different shapes using different GDI+
Functions. This example uses GraphicsPath()
functions and others. To Create Elongated buttons, Rounded cornered groupbox and Trapezium labels we are using the a GrahicsPath()
object and added a semicircle to the left and right and a rectangle in between for the elongated shape. To Create a trapezium shape for the labels I have used the client rectangle and created a polygon with points to the three corners of the clientrectangle and the top right corner i have reduced the width by 20 pixels. for the drop shadow labels i have got shadow colors by using alpha index of black colors and written the text as many times as the shadow length is specified increasing the left and top position by 1 pixels for each iteration. Also used control's Region Property to specify non regular shaped i.e. non rectangular shape of the control.