C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

C# User Control - an Example


Posted Date: 04 Jan 2007    Resource Type: Articles    Category: .NET Framework
Author: Sanjeevi Kumar SMember Level: Bronze    
Rating: 1 out of 5Points: 10



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/



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Swapping two integer values in C# [Interview Question]
Previous Resource: Properties: Old wine in new bottle.
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use