5,692,513 members and growing! (18,252 online)
Email Password   helpLost your password?
Languages » C / C++ Language » General     Intermediate

Advanced Shape Control

By Sreenivas Vemulapalli

Advanced Shape Control
VBWindows, .NET, .NET 1.0, NT4, Win2K, WinXPVS.NET2002, Visual Studio, Dev

Posted: 4 Sep 2002
Updated: 4 Sep 2002
Views: 109,270
Bookmarked: 32 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
28 votes for this Article.
Popularity: 6.19 Rating: 4.28 out of 5
0 votes, 0.0%
1
1 vote, 4.5%
2
0 votes, 0.0%
3
5 votes, 22.7%
4
16 votes, 72.7%
5

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


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

Occupation: Web Developer
Location: United States United States

Other popular C / C++ Language articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 19 of 19 (Total in Forum: 19) (Refresh)FirstPrevNext
GeneralShare- RoundedRectangle not workingmembersbkrishnan2523:38 11 Nov '08  
Generalparameter is not valid.Errormemberkhandelwalpankajcdac6:28 13 Jan '08  
GeneralBorderStyle BugmemberMQUINNUSA12:09 18 Jun '07  
GeneralThanx ....Great controlmemberammsamm14:05 21 Apr '07  
GeneralRead ShapeEx using xmlReader ??memberPrajakta Patil18:46 16 Jan '07  
QuestionThanks! But we need your help...memberPrajakta Patil19:24 17 Dec '06  
GeneralDisplaying ShapeEx in my toolboxmemberechelon38093:16 7 Dec '06  
GeneralGenerating Shapes at RuntimememberChandan_Kr1:55 30 Aug '06  
GeneralVB.NET 2003memberfissidens0:26 5 Nov '05  
GeneralTransparent Fillmembermuralikannur22:52 6 Mar '05  
GeneralRe: Transparent FillmemberMohan Patil19:48 11 Mar '07  
GeneralRe: Transparent Fillmembera_annunz6:11 20 Feb '08  
GeneralSSLmembersunyz21:40 23 Dec '04  
Generalneed line controlmembernjpost4111:34 23 Feb '04  
GeneralExcellent Control. Fill Color bug...sussAnonymous18:53 21 Nov '03  
GeneralExpandableObjectConverter bustedmemberelitecommerceserver19:14 17 Sep '03  
GeneralRe: ExpandableObjectConverter bustedsussAnonymous3:28 19 Jun '04  
GeneralGood workeditorNishant S4:21 11 Sep '03  
GeneralThx...I was looking for this type of controlmemberWGenc11:23 4 Aug '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 4 Sep 2002
Editor: Nishant Sivakumar
Copyright 2002 by Sreenivas Vemulapalli
Everything else Copyright © CodeProject, 1999-2008
Web11 | Advertise on the Code Project