Click here to Skip to main content
Licence 
First Posted 4 Sep 2002
Views 142,062
Bookmarked 52 times

Advanced Shape Control

By | 4 Sep 2002 | Article
Advanced Shape Control

Introduction

For some reason microsoft decided that we don't need the shape control that comes with Visual Studio 6.0, and removed it from VS.NET and left us to buy a third party control or develop one by our own.

Well, with the extensive namespaces that dot net supports for GDI+ and Windows Controls, it's easy to develop and extend the old shape control. The main purpose of this control is, its a lightweight control and  improves the user interface very much by grouping controls with out using a Group box or other controls.

This article is also a good resource for GDI+, and propertygrid control. I am developing this control as a Windows Extended controls library, to which i will be adding more controls in future. So, any suggetions for custom controls are welcome.

This article assumes that you have good understanding of GDI+, PropertyGrid and Windows Controls.

Refer to my other article on propertygrid Using PropertyGrid

NameSpaces Used 

System.ComponentModel
System.ComponentModel.Design.Serialization
System.Text
System.Drawing
System.Drawing.Drawing2D
System.Globalization
System.Reflection
System.Windows.Forms

Topics Covered 

  • GDI +
  • Windows Controls
  • PropertyGrid

Description

The attached project has a demo showing how to use the control. Well, using the control is fairly simple yet very extensive. It supports 4 shapes with Solid colors, Gradiant fill, Textures, Hatch fills, shadows, 3D Borders,text and 3D border styles. Using these combinations you can create a variety of effects. The main purpose of this control is to improve the visual appearance of the forms, so use of 1 or 2 instances will be enough to achive the result.

Properties 

Properties are divided into sub categories as 

Borderproperties

 

 

 

 

 

TextProperties

HatchProperties

GradiantProperties     

 

ShadowProperties

 

 

 

Each of these properties can be expanded from propertygrid and customized based on the requirement also these properties can be turned on or off by a Drawxxxx property.   

ToDo Features

  • Implement support for other shapes
  • Implement a C# version
  • Implement 3D Borders for all shapes

Notes

  • Please post any remarks,bugs to this article's thread
  • Suggestions are welcome for windows controls as part of my Windows Extended Controls Library

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

Sreenivas Vemulapalli

Web Developer

United States United States

Member

Working as consultant in Client/server,Web Development, Automation areas using C#,Vb,Vb.net,Asp.net,Sql Server,Xml,Html&Dhtml etc..
Looking for a challenging project in .NET


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
GeneralMy vote of 5 Pinmembermanoj kumar choubey3:12 18 Feb '12  
GeneralBadge Designer Pinmemberyogeshcprajapati@hotmail.com Yogesh7:03 18 Aug '09  
GeneralShare- RoundedRectangle not working Pinmembersbkrishnan2522:38 11 Nov '08  
Generalparameter is not valid.Error Pinmemberkhandelwalpankajcdac5:28 13 Jan '08  
GeneralBorderStyle Bug PinmemberMQUINNUSA11:09 18 Jun '07  
GeneralThanx ....Great control Pinmemberammsamm13:05 21 Apr '07  
QuestionRead ShapeEx using xmlReader ?? PinmemberPrajakta Patil17:46 16 Jan '07  
AnswerRe: Read ShapeEx using xmlReader ?? Pinmemberyogeshcprajapati@hotmail.com Yogesh6:40 15 May '09  
QuestionThanks! But we need your help... PinmemberPrajakta Patil18:24 17 Dec '06  
GeneralDisplaying ShapeEx in my toolbox Pinmemberechelon38092:16 7 Dec '06  
Firstly, thanks for a great acticle, you have helped me greatly.
 
Forgive my inexperience but after having added a reference to your ShapeEx control to a new project - just to see how to do this - I was expecting it to add a reference to it in the toolbox but it is not there.
 
I have a form in this new project but I cant get the ShapeEx control onto the form, and I cant see how you did this in the test UI example you have providedConfused | :confused: Confused | :confused: . Please help!
 

 
Echelon

GeneralRe: Displaying ShapeEx in my toolbox PinmemberEdmondo Gigli1:00 5 Jan '10  
GeneralGenerating Shapes at Runtime PinmemberChandan_Kr0:55 30 Aug '06  
GeneralVB.NET 2003 Pinmemberfissidens23:26 4 Nov '05  
GeneralTransparent Fill Pinmembermuralikannur21:52 6 Mar '05  
GeneralRe: Transparent Fill PinmemberMohan Patil18:48 11 Mar '07  
GeneralRe: Transparent Fill Pinmembera_annunz5:11 20 Feb '08  
AnswerRe: Transparent Fill Pinmemberdcallaghan5:59 11 Dec '08  
GeneralSSL Pinmembersunyz20:40 23 Dec '04  
Generalneed line control Pinmembernjpost4110:34 23 Feb '04  
GeneralExcellent Control. Fill Color bug... PinsussAnonymous17:53 21 Nov '03  
GeneralExpandableObjectConverter busted Pinmemberelitecommerceserver18:14 17 Sep '03  
GeneralRe: ExpandableObjectConverter busted PinsussAnonymous2:28 19 Jun '04  
GeneralGood work PineditorNishant S3:21 11 Sep '03  
GeneralThx...I was looking for this type of control PinmemberWGenc10:23 4 Aug '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
Web02 | 2.5.120529.1 | Last Updated 5 Sep 2002
Article Copyright 2002 by Sreenivas Vemulapalli
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid