In C#.NET Windows Forms Applications every control
has a special class and is present in System.Windows.Forms namespace observe
the following table
SRNO
|
Control Name
|
class Name
|
01
|
Text Box
|
System.Windows.Forms.TextBox
|
02
|
Label
|
System.Windows.Forms.Label
|
03
|
Button
|
System.Windows.Forms.Button
|
04
|
Radio Button
|
System.Windows.Forms.RadioButton
|
05
|
Check Box
|
System.Windows.Forms.CheckBox
|
06
|
Group Box
|
System.Windows.Forms.GroupBox
|
07
|
Panel
|
System.Windows.Forms.Panel
|
08
|
TabControl
|
System.Windows.Forms.TabControl
|
09
|
OpenFileDialog
|
System.Windows.Forms.OpenFileDialog
|
10
|
SaveFileDialog
|
System.Windows.Forms.SaveFileDialog
|
11
|
FontDialog
|
System.Windows.Forms.FontDialog
|
12
|
ColorDialog
|
System.Windows.Forms.ColorDialog
|
13
|
PageSetupDialog
|
System.Windows.Forms.PageSetupDialog
|
14
|
PrintDialog
|
System.Windows.Forms.PrintDialog
|
15
|
Timer
|
System.Windows.Forms.Timer
|
16
|
ImageList
|
System.Windows.Forms.ImageList
|
17
|
PictureBox
|
System.Windows.Forms.PictureBox
|
18
|
ToolTip
|
System.Windows.Forms.ToolTip
|
19
|
NumericUpDown
|
System.Windows.Forms.NumericUpDown
|
20
|
Calender
|
System.Windows.Forms.Calender
|
21
|
DateTimePicker
|
System.Windows.Forms.DateTimePicker
|
22
|
NotifyIcon
|
System.Windows.Forms.NotifyIcon
|
23
|
ListBox
|
System.Windows.Forms.ListBox
|
24
|
ComboBox
|
System.Windows.Forms.ComboBox
|
25
|
ListView
|
System.Windows.Forms.ListView
|
26
|
TreeView
|
System.Windows.Forms.TreeView
|
27
|
RichTextBox
|
System.Windows.Forms.RichTextBox
|
28
|
LinkLabel
|
System.Windows.Forms.LinkLabel
|
29
|
ProgressBar
|
System.Windows.Forms.ProgressBar
|
30
|
CheckedListBox
|
System.Windows.Forms.CheckedListBox
|
31
|
MenuStrip
|
System.Windows.Forms.MenuStrip
|
32
|
ContextMenuStrip
|
System.Windows.Forms.ContextMenuStrip
|
- Any Control we create on Form is an object to the respective class i.e.,TextBox1,TextBox2…..
- Are objects for TextBox Class
- Button1,Button2….. are objects for Button Class.
- When we create these controls memory will be allotted separately for every object
Naming Conventions :-
1. To understand real
time naming conventions
2. To understand and implement functional or field level validation
- In general in real time programming programmer is not supposed to assign the names of the controls rather Project Leader / System Analyst will design the Forms, Reports and the controls to be present in those, what names to be given to the Controls with in the Design Document
- Programmer should use the same Names given in the Design Document
- In general control name can be divided into two parts
==} Purpose of the control
Control Identification
TextBox --- txt
Button --- btn / cmd
Label ---
lbl
ListBox ---
lst
Combobox ---
cmb
RadiioButton --- opt
CheckBox ---
chk
Purpose of the Control
For Accepting EmployeeId in an Applications --- EmpId
For
Accepting EmployeeName Name in an Applications --- EName
Examples of Some Sample
Control Names ……….
txtEmpId
txtEName
btnSubmit
No comments:
Post a Comment