Click here to Skip to main content
15,893,487 members
Articles / Programming Languages / Visual Basic
Article

Elongated Buttons, Rounded cornered Groupboxes and Labels of Trapeziums Shaped

Rate me:
Please Sign up or sign in to vote.
3.77/5 (29 votes)
20 May 2004 91.3K   4.5K   53   12
This article shows how to create elongated buttons, rounded cornered groupboxes and labels of trapezium shape

Sample screenshot

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
My mail ID is shouvik@lycos.com

Comments and Discussions

 
QuestionButton text align Pin
drummers17-Sep-14 9:50
drummers17-Sep-14 9:50 
Questionthank you button super Pin
Hakan Arslantas27-Mar-13 11:01
Hakan Arslantas27-Mar-13 11:01 
Generalthank you Pin
zoryz16-Nov-09 4:58
zoryz16-Nov-09 4:58 
Generalis it fine is I use ur code Pin
hamletj27-Mar-07 2:35
hamletj27-Mar-07 2:35 
GeneralIn c# Pin
fhunth12-Aug-04 5:16
fhunth12-Aug-04 5:16 
GeneralRe: In c# Pin
Shouvik18-Aug-04 20:00
Shouvik18-Aug-04 20:00 
GeneralRe: In c# Pin
spvarapu5-May-05 3:23
spvarapu5-May-05 3:23 
Generalconvert to server sidec ode Pin
webber12345631-Jul-04 13:24
webber12345631-Jul-04 13:24 
Questionplop ? Pin
Epoque5119-Jul-04 4:58
Epoque5119-Jul-04 4:58 
AnswerRe: plop ? Pin
Shouvik18-Aug-04 19:55
Shouvik18-Aug-04 19:55 
GeneralThings to add Pin
mav.northwind5-Dec-03 20:48
mav.northwind5-Dec-03 20:48 
GeneralRe: Things to add Pin
Shehzad Salim6-Dec-03 0:46
Shehzad Salim6-Dec-03 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.