vb 命名 规则
引用:http://hi.baidu.com/mangel2002/blog/item/ab36d9e9492b392bb80e2d01.html
一、常用控件的命名:
控件类型 前缀 例子
Form frm frmMain
Menu mnu mnuFileOpen
Label lbl lblHelpMessage
Check box chk chkReadOnly
Combo box cbo cboEnglish
Command button cmd cmdExit
Common dialog dlg dlgFileOpen
Data grid dgd dgdTitles
Date picker dtp dtpPublished
Directory list box dir dirSource
Drive list box drv drvTarget
File list box fil filSource
ADO Data ado adoBiblio
Frame fra fraLanguage
Hierarchical flexgrid flex flexOrders
Image img imgIcon
ImageList ils ilsAllIcons
List box lst lstPolicyCodes
ListView lvw lvwHeadings
Month view mvw mvwPeriod
MS Chart ch chSalesbyRegion
MS Flex grid msg msgClients
MS Tab mst mstFirst
OLE container ole oleWorksheet
Option button opt optGender
Picture box pic picVGA
ProgressBar prg prgLoadFile
RichTextBox rtf rtfReport
StatusBar sta staDateTime
TabStrip tab tabOptions
Text box txt txtLastName
Toolbar tlb tlbActions
TreeView tre treOrganization
二、变量命名
数据类型 前缀 例子
String (字符串类型) str strFName
Integer (短整数类型) int intQuantity
Long (长整数类型) lng lngDistance
Single (单精度浮点数类型) sng sngAverage
Double (双精度浮点数类型) dbl dblTolerance
Boolean (布尔类型) bln blnFound
Byte (字节类型) byt bytRasterData
Date (日期类型) dte dteNow
Currency (货币计算与定点计算类型) cur curRevenue
Object (东西类型) obj objCurrent
Variant (变体类型) vnt vntCheckSum