
Introduction
This is my first article and am sorry for any mistakes ;-)
The control is a rainbow coloured button. It has all the features of a normal button, it is also fully customizable with your own colours. I would like to quickly thank Alexandr Khilov for his superb article on the cuteButton.
Background
I was on the bus coming back from work with I saw a rainbow scarf and thought I'd make a rainbow button. Well enough of that lets get down to the code.
How to use the code
The rainbow button can be accessed from the System.Windows.Forms namespace. It has two constructors, one takes five colours and the other takes non. The later assigns default colours to the button. You are able to change the colours with an immediate effect on the button.
private System.Windows.Forms.rainbowButton rainbowButton1;
rainbowButton1 = new System.Windows.Forms.rainbowButton (); <BR> rainbowButton1 = new System.Widows.Forms.rainbowButton
(Colors.Blue, Colors.Red, Colors.Pink, Colors.Aqua, Colors.Green);<BR>
When a colour is changed the ColorChanged event is raised to use at your disposal. The rainbow button has the workings of any other button, so all normal event are available.
Finishing up
For a complete look at the control, have a peek at the code and mess about with it. If their is any problems with the control please email me. Enjoy the control.