Introduction
Always I want to create reusable things and User control is one among them. Basically we can classify the user defined controls into three ways. Extended controls : Inherited from existing control and we can extend it by providing some additional behaviors and properties Composite Controls : Created by merging two or more basic controls Entirely a new control : It requires heavy code including graphics programming
Month Picker - a user control
I have developed a user control called MonthPicker to pick a month. I don’t think, it is a control to be used often. But whenever we want to provide a provision for user to select/enter a month, it will be very useful. Apart from the usage of this control, certainly it is an example for C# developers who want to create user controls.
My MonthPicker which is a composite user control, is created by the following basic controls * A Text Box to display the month * 3 Command Buttons including Next Month button, Previous Month button and Pick button * Two Panels (only for their Dock property) * One Form to show options to pick a month and the form has three option buttons and a textbox, two combo-boxes and two command buttons.
Members
This user control has the following custom members Properties Value MonthFormat MonthText Event MonthChanged Public Methods ShowPickForm HidePickForm
Summary
Again I want to say that apart from the usage of this control, certainly it is an example for C# developers who want to create user controls.
For more information and source code visit
http://ivision.wordpress.com/2006/12/25/month-picker-an-user-control-in-c/
|
No responses found. Be the first to respond and make money from revenue sharing program.
|