ðH geocities.com /Baja/Dunes/7592/vbcc3.htm geocities.com/Baja/Dunes/7592/vbcc3.htm .delayed x MÔJ ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °oÙ ³ OK text/html °h ³ ÿÿÿÿ b‰.H Fri, 10 Jul 1998 01:16:17 GMT € Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98) en, * MÔJ ³
Visual Basic Naming Conventions
Page 3
Previous Page
|
Home Page
|
VB Page
|
Next Page
And Private functions:
Private Function nNextItem() as Integer
Private Function sGetPath (byVal sFileName As String) As String
Global subroutines are prefixed in exactly the same way that global variables are:
Public Sub GbClearGrid()
Public Function nGbNextValue() As Integer
Public functions and subroutines defined in classes and forms are methods and do not
have type or scope prefixes.
Protected form and class properties, Property Let, Property Set, and Property Get
routines do not have scope of type prefixes.
Declaring Windows API functions.
Use the Alias keyword to add the prefix Win. For example, CallWindowProc becomes
WinCallWindowProc. When declaring other DLL functions, use the prefix Dll.
Contols and Forms
Prefixes for controls and forms are given at the end of this document. Forms are named in the same manner as controls, though a form behaves like, and basically is, a class. Forms are named with the prefix frm.
Dim frmNewBrowser As New frmSaleBrowser
Constants
Constants are named in all uppercase letters with no type or scope prefix.
Arbitrary prefixes, possibly separated by and '_' (since it is all uppercase)
can show the relationship between contants.
Const DEFAULT_KEY As String = "BACK OFFICE"
Const DEFAULT_SECTION As String = "DATABASE INFO"
Type and Class Definitions
Type names are prefixed with UDT for the declaration and for the dimensioned variable, the lowercase udt is used. This rule applies to classes as well, using uppercase C and lowercase c respectively.
Type UDTPerson
sFullName As String
nSalary As Integer
End Type
And in use:
Dim udtNewUser As UDTPerson
Dim cNewOpp As New Copportunity
Page 3
Previous Page
|
Home Page
|
VB Page
|
Next Page