logo_michael-thomas.jpg (3143 bytes)

VB Naming Conventions

Under construction. 
Please EMAIL me with your suggestions: michael@michael-thomas.com

VB Hungarian Notation

  • Standard variables:  begin in lower case with the "scope" prefix, then the "variable type", then using upper and lower case a descriptive meaning.

  • Constant variables:  follow the stard variable guidelines except that all of the characters are upper case.

  • Functions:  begin in lower case with the return variable type, then upper and lower to describe the function.

Examples:

  • gintNumOfEmp - means global scope, integer variable type, that has the value of the number of employees.

  • function strSearchReplace - this is a function that returns a string.

Other Standards

  • Function Arguments - always use "ByVal".   Good programming follows this style, however there is a lot of old style code out there so be aware!  Java forces all arguments to be by value. 

Convention Prefix Table

Category Prefix
Files
  • frm - Forms (.frm files)
  • bas - Basic procedure (.bas files)
  • cls - Classes (.cls files)
Scope
  • g - global
  • m - Module
  • <none> - Local to procedure
Variable Types
  • bln - Boolean
  • byt - Byte
  • col - Collection object
  • cur - Currency
  • dtm - Date (Time)
  • dbl - Double
  • err - Error
  • int - Integer
  • lng - Long
  • obj - Object
  • sng - Single
  • str - String
  • u[xxx] - User-defined Type
  • vnt - Variant
Objects - common
  • frm - Form
  • btn - CommandButton
  • chk - CheckBox
Objects - other
  • drv - driveListBox
  • dir - dirListBox
  • lst - FileListBox
  • pgr - ProgressBar
  • dao - Data Access Object
  • fhd - File Header (Numeric Value from the OS for a file header)
Objects - user
  • uobj - General User defined object
   
   
   
   
   
Last edited: 12/12/13

 mailbox_hand.gif (3164 bytes)

home.jpg (2907 bytes)

FPCreated.gif (9864 bytes)

FPCreated.gif (1990 bytes)

Contact Me: Click Here   Search: Click Here  Home Page:  Free Java Certification Training by Michael Thomas