C#的winform控件命名規(guī)范
本文詳細(xì)講述了C#的winform控件命名規(guī)范。分享給大家供大家參考。具體如下:
注:這里用紅字標(biāo)記的部分表示有重復(fù)出現(xiàn),括號(hào)內(nèi)為替代表示方案
1.標(biāo)準(zhǔn)控件
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
btn |
Button |
2 |
chk |
CheckBox |
3 |
ckl |
CheckedListBox |
4 |
cmb |
ComboBox |
5 |
dtp |
DateTimePicker |
6 |
lbl |
Label |
7 |
llb |
LinkLabel |
8 |
lst |
ListBox |
9 |
lvw |
ListView |
10 |
mtx |
MaskedTextBox |
11 |
cdr |
MonthCalendar |
12 |
icn |
NotifyIcon |
13 |
nud |
NumeircUpDown |
14 |
pic |
PictureBox |
15 |
prg(pgb) |
ProgressBar |
16 |
rdo |
RadioButton |
17 |
rtx |
RichTextBox |
18 |
txt |
TextBox |
19 |
tip |
ToolTip |
20 |
tvw |
TreeView |
21 |
wbs |
WebBrowser |
2.容器控件
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
flp |
FlowLayoutPanel |
2 |
grp |
GroupBox |
3 |
pnl |
Panel |
4 |
spl(spc) |
SplitContainer |
5 |
tab |
TabControl |
6 |
tlp |
TableLayoutPanel |
3.菜單和工具欄
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
cms |
ContextMenuStrip |
2 |
mns |
MenuStrip |
3 |
ssr |
StatusStrip |
4 |
tsr |
ToolStrip |
5 |
tsc |
ToolStripContainer |
4.數(shù)據(jù)
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
dts |
DataSet |
2 |
dgv |
DataGridView |
3 |
bds |
BindingSource |
4 |
bdn |
BindingNavigator |
5 |
rpv |
ReportViewer |
5.對(duì)話框
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
cld |
ColorDialog |
2 |
fbd |
FolderBrowserDialog |
3 |
fnd |
FontDialog |
4 |
ofd |
OpenFileDialog |
5 |
sfd |
SaveFileDialog |
6.組件
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
bgw |
BackgroundWorker |
2 |
dre |
DirectoryEntry |
3 |
drs |
DirectorySearcher |
4 |
err |
ErrorProvider |
5 |
evl |
EventLog |
6 |
fsw |
FileSystemWatcher |
7 |
hlp |
HelpProvider |
8 |
img |
ImageList |
9 |
msq |
MessageQueue |
10 |
pfc |
PerformanceCounter |
11 |
prc |
Process |
12 |
spt |
SerialPort |
13 |
scl |
ServiceController |
14 |
tmr |
Timer |
7.印刷
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
psd |
PageSetupDialog |
2 |
prd |
PrintDialog |
3 |
pdc |
PrintDocument |
4 |
prv |
PrintPreviewControl |
5 |
ppd |
PrintPreviewDialog |
8.水晶報(bào)表
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
crv |
CrystalReportViewer |
2 |
rpd |
ReportDocument |
9.其他
序號(hào) |
控件類型簡(jiǎn)寫(xiě) |
控件類型 |
1 |
dud |
DomainUpDown |
2 |
hsc |
HScrollBar |
3 |
prg |
PropertyGrid |
4 |
spl |
Splitter |
5 |
trb |
TrackBar |
6 |
vsc |
VScrollBar |
另一個(gè)版本
序號(hào) |
控件類型 |
控件類型簡(jiǎn)寫(xiě) |
標(biāo)準(zhǔn)命名舉例 |
1 |
Label |
lbl |
lblMessage |
2 |
LinkLabel |
llbl |
llblToday |
3 |
Button |
btn |
btnSave |
4 |
TextBox |
txt |
txtName |
5 |
MainMenu |
mmnu |
mmnuFile |
6 |
CheckBox |
chk |
chkStock |
7 |
RadioButton |
rbtn |
rbtnSelected |
8 |
GroupBox |
gbx |
gbxMain |
9 |
PictureBox |
pic |
picImage |
10 |
Panel |
pnl |
pnlBody |
11 |
DataGrid |
dgrd |
dgrdView |
12 |
ListBox |
lst |
lstProducts |
13 |
CheckedListBox |
clst |
clstChecked |
14 |
ComboBox |
cbo |
cboMenu |
15 |
ListView |
lvw |
lvwBrowser |
16 |
TreeView |
tvw |
tvwType |
17 |
TabControl |
tctl |
tctlSelected |
18 |
DateTimePicker |
dtp |
dtpStartDate |
19 |
HscrollBar |
hsb |
hsbImage |
20 |
VscrollBar |
vsb |
vsbImage |
21 |
Timer |
tmr |
tmrCount |
22 |
ImageList |
ilst |
ilstImage |
23 |
ToolBar |
tlb |
tlbManage |
24 |
StatusBar |
stb |
stbFootPrint |
25 |
OpenFileDialog |
odlg |
odlgFile |
26 |
SaveFileDialog |
sdlg |
sdlgSave |
27 |
FolderBrowserDialog |
fbdlg |
fgdlgBrowser |
28 |
FontDialog |
fdlg |
fdlgFoot |
29 |
ColorDialog |
cdlg |
cdlgColor |
30 |
PrintDialog |
pdlg |
pdlgPrint |
希望本文所述對(duì)大家的C#程序設(shè)計(jì)有所幫助。
- .Net WInform開(kāi)發(fā)筆記(三)談?wù)勛灾瓶丶?自定義控件)
- c#中多線程訪問(wèn)winform控件的若干問(wèn)題小結(jié)
- 深入分析C#中WinForm控件之Dock順序調(diào)整的詳解
- WinForm子窗體訪問(wèn)父窗體控件的實(shí)現(xiàn)方法
- WinForm自定義函數(shù)FindControl實(shí)現(xiàn)按名稱查找控件
- 簡(jiǎn)介Winform中創(chuàng)建用戶控件
- WinForm實(shí)現(xiàn)移除控件某個(gè)事件的方法
- C#中讓控件全屏顯示的實(shí)現(xiàn)代碼(WinForm)
- C# WinForm程序處理后臺(tái)繁忙導(dǎo)致前臺(tái)控件假死現(xiàn)象解決方法
- 使用重繪項(xiàng)美化WinForm的控件
相關(guān)文章
C#實(shí)現(xiàn)ComboBox自動(dòng)匹配字符
本文介紹C#如何實(shí)現(xiàn)ComboBox自動(dòng)匹配字符1.采用CustomSource當(dāng)做提示集合2. 直接使用下拉列表中的項(xiàng)作為匹配的集合,需要了解的朋友可以參考下2012-12-12C#中Convert.ToString和ToString的區(qū)別分析
這篇文章主要介紹了C#中Convert.ToString和ToString的區(qū)別,是C#初學(xué)者需要牢固掌握的技巧,需要的朋友可以參考下2014-08-08Winform利用分頁(yè)控件實(shí)現(xiàn)導(dǎo)出PDF文檔功能
當(dāng)前的Winform分頁(yè)控件中,當(dāng)前導(dǎo)出的數(shù)據(jù)一般使用Excel來(lái)處理,但是有框架的使用客戶希望分頁(yè)控件能夠直接導(dǎo)出PDF,所以本文整理了一下分頁(yè)控件導(dǎo)出PDF的處理過(guò)程,分享一下2023-03-03C#怎樣實(shí)現(xiàn)文件下載斷點(diǎn)續(xù)傳
這篇文章主要介紹了C#怎樣實(shí)現(xiàn)文件下載斷點(diǎn)續(xù)傳,對(duì)斷點(diǎn)續(xù)傳感興趣的同學(xué),可以參考下2021-04-04c#編寫(xiě)的高并發(fā)數(shù)據(jù)庫(kù)控制訪問(wèn)代碼
往往大數(shù)據(jù)量,高并發(fā)時(shí), 瓶頸都在數(shù)據(jù)庫(kù)上, 好多人都說(shuō)用數(shù)據(jù)庫(kù)的復(fù)制,發(fā)布, 讀寫(xiě)分離等技術(shù), 但主從數(shù)據(jù)庫(kù)之間同步時(shí)間有延遲.2015-03-03DevExpress實(shí)現(xiàn)TreeList按條件隱藏節(jié)點(diǎn)CheckBox的方法
這篇文章主要介紹了DevExpress實(shí)現(xiàn)TreeList按條件隱藏節(jié)點(diǎn)CheckBox的方法,需要的朋友可以參考下2014-08-08