Library tutorials & articles
VB Conventions
Introduction
This appendix presents a set of suggested coding conventions for Visual Basic programs.
Coding conventions are programming guidelines that focus not on the logic of the program but on its physical structure and appearance. They make the code easier to read, understand, and maintain. Coding conventions can include:
-
Naming conventions for objects, variables, and procedures.
-
Standardized formats for labeling and commenting code.
-
Guidelines for spacing, formatting, and indenting.
In the sections that follow, each of these areas are discussed, along with examples of good usage.
Topics
|
Why Coding Conventions?
The main reason for using a consistent set of coding conventions is to standardize the structure and coding style of an application so that you and others can easily read and understand the code. |
|
Object Naming
Conventions
Objects should be named with a consistent prefix that makes it easy to identify the type of object. This section lists recommended conventions for controls, data access objects, and menus. |
|
Constant
and Variable Naming Conventions
This topic lists recommended conventions for constants and variables supported by Visual Basic. It also discusses the issues of identifying data type and scope. |
|
Structured
Coding Conventions
In addition to naming conventions, structured coding conventions, such as code commenting and consistent indenting, can greatly improve code readability. This topic discusses standards for these areas. |
Related articles
Related discussion
-
Key_Press() event for text box
by Aquila (1 replies)
-
Regarding Visual Basic Programme
by manjunathsl2007 (0 replies)
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
Nice just what I was looking for. Wasn't sure about where to look for this sort of thing.
Excelent, short and concise.
This thread is for discussions of VB Conventions.