Click here to Skip to main content
Licence 
First Posted 4 Dec 2003
Views 61,789
Bookmarked 40 times

Elongated Buttons, Rounded cornered Groupboxes and Labels of Trapeziums Shaped

By | 20 May 2004 | Article
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

About the Author

Shouvik

Web Developer

India India

Member

My mail ID is shouvik@lycos.com

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalthank you Pinmemberzoryz4:58 16 Nov '09  
Generalis it fine is I use ur code Pinmemberhamletj2:35 27 Mar '07  
GeneralIn c# Pinmemberfhunth5:16 12 Aug '04  
GeneralRe: In c# PinmemberShouvik20:00 18 Aug '04  
GeneralRe: In c# Pinmemberspvarapu3:23 5 May '05  
Generalconvert to server sidec ode Pinmemberwebber12345613:24 31 Jul '04  
Questionplop ? PinmemberEpoque514:58 19 Jul '04  
AnswerRe: plop ? PinmemberShouvik19:55 18 Aug '04  
GeneralThings to add Pinmembermav.northwind20:48 5 Dec '03  
GeneralRe: Things to add PinmemberShehzad Salim0:46 6 Dec '03  

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

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 21 May 2004
Article Copyright 2003 by Shouvik
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid