WinForm control Naming conventions for C #

Source: Internet
Author: User

Note: The section marked with a red letter here indicates that there is a repetition, and the alternative representation scheme in parentheses

1. Standard Controls

Serial number

Control type Shorthand

Control type

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

21st

Wbs

WebBrowser

2. container Controls

Serial number

Control type Shorthand

Control type

1

Flp

FlowLayoutPanel

2

Grp

GroupBox

3

PnL

Panel

4

SPL (SPC)

SplitContainer

5

tab

TabControl

6

Tlp

TableLayoutPanel

3. menus and toolbars

Serial number

Control type Shorthand

Control type

1

Cms

ContextMenuStrip

2

Mns

MenuStrip

3

Ssr

StatusStrip

4

Tsr

ToolStrip

5

Tsc

ToolStripContainer

4. Data

Serial number

Control type Shorthand

Control type

1

Dts

DataSet

2

Dgv

DataGridView

3

BDs

BindingSource

4

Bdn

BindingNavigator

5

Rpv

ReportViewer

5. dialog Box

Serial number

Control type Shorthand

Control type

1

Cld

ColorDialog

2

Fbd

FolderBrowserDialog

3

Fnd

FontDialog

4

Ofd

OpenFileDialog

5

SfD

SaveFileDialog

6. Components

Serial number

Control type Shorthand

Control type

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. Printing

Serial number

Control type Shorthand

Control type

1

Psd

PageSetupDialog

2

Prd

PrintDialog

3

Pdc

PrintDocument

4

Prv

PrintPreviewControl

5

Ppd

PrintPreviewDialog

8. Crystal Report

Serial number

Control type Shorthand

Control type

1

Crv

Crystalreportviewer

2

Rpd

Reportdocument

9. Other

Serial number

Control type Shorthand

Control type

1

Dud

DomainUpDown

2

Hsc

HScrollBar

3

Prg

PropertyGrid

4

Spl

Splitter

5

Trb

TrackBar

6

Vsc

VScrollBar

Another version

Serial number

Control type

Control type Shorthand

Example of standard naming

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

21st

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

WinForm control Naming conventions for C #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.