Click here to Skip to main content
11,480,626 members (63,595 online)
Click here to Skip to main content

Extended .NET Controls

, 4 Nov 2005 139.3K 9.1K 179
Rate this:
Please Sign up or sign in to vote.
A .NET library containing highly customizable controls.

Introduction

We all like the XP-themed controls, don't we? But do you also think the standard controls provided with the C# toolbox are not enough? Well I am trying to create a whole set containing existing controls, but also new controls that will (hopefully) blow your mind. I can already hear people screaming at me that the internet is stuffed with such controls created by various people. Now let me tell you that I am trying to be more innovative than the others. I have downloaded many controls for me to use, but there is always some feature missing that I need. So now I am going to create these controls with as many thinkable features as possible.

Windows XP like theming

I also dislike the dependence of UxTheme.dll to theme the controls, so these controls do not need Windows XP as the operating system. I paint the controls completely from scratch so the only thing you need to use these controls is the .NET Framework 1.1 and a version of Windows you prefer.

The ExtendedDotNET.Controls namespace

I created a class library which is called ExtendedDotNET.Controls. Hereunder, I will store all my controls in it so they are all packed in one nice library.

An overview of the ExtendedDotNET.Controls namespace so far created:

The ExtendedDotNET.Controls namespace

The ExtendedDotNET.Controls.Panels namespace

This namespace contains all panel-like controls

ExtendedDotNET.Controls.Panels.Panel

This is a panel-like control. The default System.Windows.Forms.Panel control hasn't got much features to present itself. This panel however has a nice XP-like view as you can see in the following image:

ExtendedDotNET.Controls.Panels.Panel Preview

This control has the following properties:

ExtendedDotNET.Controls.Panels.Panel Properties

The following property may need some explanation:

  • Style
    • BorderStyle.None: doesn't draw a border.
    • BorderStyle.Single: draws a border with the given color and width.
    • BorderStyle.Raised3D: draws a raised border using the given color and width (not working yet).
    • BorderStyle.Sunken3D: draws a sunken border using the given color and width (not working yet).
    • BorderStyle.Shadow: draws the panel with a single border with given color, width, and adds a nice shadow.

Because this panel control is derived from the System.Windows.Forms.Panel control, acting like a container, you are able to drop any control you like in it.

The ExtendedDotNET.Controls.Progress namespace

This namespace contains all progress bar controls

ExtendedDotNET.Controls.Progress.ProgressBar

This is a progress bar control like the System.Windows.Forms.ProgressBar but with much more features:

  • Place the bar horizontal or vertical.
  • Invert the progress direction in both horizontal and vertical mode.
  • Change the border style.
  • Change every single color you can find in this control.
  • Add a caption.
  • Change the dash width and spacing.
  • Change the value by dragging your mouse.
  • ...

ExtendedDotNET.Controls.Progress.ProgressBar Preview

This control has the following properties:

ExtendedDotNET.Controls.Progress.ProgressBar Properties

The following properties may need some explanation:

  • CaptionMode
    • None: The progress bar doesn't have a caption.
    • Percent: The progress bar shows the percentage [0%..100%] of its progress.
    • Value: The progress bar shows the value [minimum .. maximum] of its progress.
    • Custom: The progress bar shows the string given by the Caption property. This string can contain variable fields (<PERCENTAGE> and <VALUE>) which will be converted to there corresponding values.
  • ChangeByMouse
    • Setting this to true will allow the user to change the value dragging the bar with the mouse.
  • Edge
    • None: The progress bar doesn't have an edge.
    • Rectangle: The progress bar has a rectangle edge.
    • Rounded: The progress bar has a rounded edge like the XP-style progress bar.
  • Orientation & Invert
    • Horizontal & false: The progress bar runs from left to right.
    • Horizontal & true: The progress bar runs from right to left.
    • Vertical & false: The progress bar runs from top to bottom.
    • Vertical & true: The progress bar runs from bottom to top.
  • BarOffset, DashSpace, DashWidth

    BarOffset, DashSpace, DashWidth

  • FloodPercentage

    FloodPercentage

  • FloodStyle
    • Standard: Use the flood for the bare-edge as in the image above.
    • Horizontal: Use the flood for the complete bar, for example, to create a progress bar showing green to red:

      progressbar from green to red

      To get this effect you must set the FloodPercentage to 1 [100%]. Setting the FloodPercentage to 0.5 [50%] will have the following effect:

      progressbar from green to red

  • ProgressBarStyle
    • Dashed: creates a dashed bar like the XP-style progress bar.
    • Solid: creates a solid bar like the old-style progress bar.
  • The category "Properties":
    • The Maximum property lets you change the maximum value of the range of the control (type int).
    • The Minimum property lets you change the minimum value of the range of the control (type int).
    • The Step property lets you change the amount by which a call to the PerformStep method increases the current position of the progress bar (type int).
    • The Value property lets you change the current position of the progress bar (type int).

How To Use

Right click on the Toolbox and choose Add/Remove Items..., there you browse for the ExtendedDotNET.Controls.dll and press OK. All the controls will be added in the ToolBox under "My User Controls".

Notes

I will try to keep creating these controls and I will keep this document up-to-date. You can always mail me for suggestions because I obviously must have forgot some important features.

Revision History

Version 0.1 - 2005 October 26

  • Initial release.

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

Share

About the Author

I have been programming since my childhood and i love it as a hobby. I screw around in a couple of languages, Visual Basic, C++, MFC, C#, Java, Delphi, Pascal. Most of all I like MSVC# because i think the .NET framework is beautifully written.

Comments and Discussions

 
QuestionVery nice Control Pin
zuhe huang26-Feb-14 18:21
memberzuhe huang26-Feb-14 18:21 
QuestionLicense ? Pin
RachedN21-Feb-11 3:59
memberRachedN21-Feb-11 3:59 
GeneralIcon transparency Pin
securigy15-Jun-10 1:34
membersecurigy15-Jun-10 1:34 
GeneralRe: Icon transparency Pin
Johnny Hooyberghs15-Jun-10 1:53
memberJohnny Hooyberghs15-Jun-10 1:53 
There is no property to define a color to use as transparent. The trancparency must be defined in the icon itself (Most icons used in windows have a transparent background by default).
Also, most icon creation software is capable of doing this.

The reason buttons on a toolstrip provide a TrancparentColor property is because toolstrips used to work with bitmaps (wich do not support transparent backgrounds). Mostly the bitmap background would be made pink. These days we use Icons and PNG graphics in GUI's because they support transparent backgrounds and alpha blending.


Hope this explanation was usefull to you.
Kind Regards,
Johnny
General<value> - Custom Caption</value> Pin
RachedN2-Dec-09 22:24
memberRachedN2-Dec-09 22:24 
GeneralRe: - Custom Caption Pin
Johnny Hooyberghs3-Dec-09 1:07
memberJohnny Hooyberghs3-Dec-09 1:07 
GeneralRe: - Custom Caption Pin
RachedN23-Mar-10 21:25
memberRachedN23-Mar-10 21:25 
GeneralSuggestions Pin
Pandele Florin15-May-09 7:54
memberPandele Florin15-May-09 7:54 
Generalusing extended.net control Progress bar PRoblem to use in Web application Pin
sunkarapraveen12-Jan-09 3:45
membersunkarapraveen12-Jan-09 3:45 
GeneralProblems with value 1 Pin
PoweRoy17-Jun-08 3:45
memberPoweRoy17-Jun-08 3:45 
GeneralRe: Problems with value 1 Pin
PoweRoy17-Jun-08 3:51
memberPoweRoy17-Jun-08 3:51 
GeneralRounded panel Pin
newdark4-Feb-08 22:07
membernewdark4-Feb-08 22:07 
GeneralContinuos Progress Bar Pin
Sk8tz26-Sep-07 21:07
memberSk8tz26-Sep-07 21:07 
GeneralSmall bug [modified] Pin
Narvius30-Aug-07 6:56
memberNarvius30-Aug-07 6:56 
GeneralRe: Small bug Pin
Malpass 2k416-Jan-08 3:46
memberMalpass 2k416-Jan-08 3:46 
QuestionRotate at any angle Pin
iw2nzm12-Jun-07 13:01
memberiw2nzm12-Jun-07 13:01 
Generalvery good Pin
amin keshani30-Oct-06 20:29
memberamin keshani30-Oct-06 20:29 
GeneralThank U. Very much. Pin
Thirapong10-Aug-06 2:03
memberThirapong10-Aug-06 2:03 
GeneralUpdate for VS2005 Pin
K32117-Jun-06 11:24
memberK32117-Jun-06 11:24 
GeneralQuestions / points Pin
cechode28-Mar-06 12:40
membercechode28-Mar-06 12:40 
QuestionC++? Pin
ziofabri22-Mar-06 6:49
memberziofabri22-Mar-06 6:49 
JokeVS2005 needs recompilation (was C++?) Pin
ziofabri22-Mar-06 23:18
memberziofabri22-Mar-06 23:18 
GeneralRe: VS2005 needs recompilation (was C++?) Pin
Hooyberghs Johnny23-Mar-06 9:44
memberHooyberghs Johnny23-Mar-06 9:44 
GeneralPercentage Displayed Pin
kgoodrich1-Dec-05 4:35
memberkgoodrich1-Dec-05 4:35 
GeneralRe: Percentage Displayed Pin
Hooyberghs Johnny1-Dec-05 9:05
memberHooyberghs Johnny1-Dec-05 9:05 
GeneralPanel control container Pin
Patrick Blackman6-Nov-05 16:29
memberPatrick Blackman6-Nov-05 16:29 
GeneralIconvisible error Pin
Patrick Blackman5-Nov-05 18:53
memberPatrick Blackman5-Nov-05 18:53 
GeneralRe: Iconvisible error Pin
Hooyberghs Johnny6-Nov-05 1:08
memberHooyberghs Johnny6-Nov-05 1:08 
GeneralMore Controls Pin
joejoe GOD's Son5-Nov-05 0:07
memberjoejoe GOD's Son5-Nov-05 0:07 
GeneralRe: More Controls Pin
Hooyberghs Johnny5-Nov-05 2:54
memberHooyberghs Johnny5-Nov-05 2:54 
GeneralRe: More Controls Pin
joejoe GOD's Son5-Nov-05 23:41
memberjoejoe GOD's Son5-Nov-05 23:41 
GeneralRe: More Controls Pin
olof@pha.com.au8-Nov-05 12:34
memberolof@pha.com.au8-Nov-05 12:34 
GeneralRe: More Controls Pin
Hooyberghs Johnny8-Nov-05 12:54
memberHooyberghs Johnny8-Nov-05 12:54 
GeneralRe: More Controls Pin
oszymczak8-Nov-05 13:14
memberoszymczak8-Nov-05 13:14 
Generalsmall bug Pin
reflex@codeproject4-Nov-05 17:07
memberreflex@codeproject4-Nov-05 17:07 
GeneralRe: small bug Pin
reflex@codeproject4-Nov-05 17:10
memberreflex@codeproject4-Nov-05 17:10 
GeneralRe: small bug Pin
Hooyberghs Johnny5-Nov-05 2:56
memberHooyberghs Johnny5-Nov-05 2:56 
GeneralVery nice! Pin
machocr4-Nov-05 14:59
membermachocr4-Nov-05 14:59 
GeneralRe: Very nice! Pin
Sauron-x8-Nov-05 3:17
memberSauron-x8-Nov-05 3:17 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 4 Nov 2005
Article Copyright 2005 by Johnny Hooyberghs
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid