Home | Careers | IT Counseling | IT Jobs | IT Resources

 

 

 
About Us | Advertise | Feedback | Contact Us | Bookmark this page now|
Have any doubts regarding how to Search IT Training Courses?...Click here for Quick Search Tips Search IT Courses
Have any doubts regarding Keyword Search?...Click here for Quick Search Tips keyword
Have any doubts regarding Institutes Search?...Click here for Quick Search Tips institutes
Have any doubts regarding Specialization Search?...Click here for Quick Search Tips specialization
Have any doubts regarding Fees Search?...Click here for Quick Search Tips fees
to
Have any doubts regarding Duration Search?...Click here for Quick Search Tips duration

IT dart Tips

Which IT course ?

Venture Capital

Online Education

Exams Required for US of A

Overview of Admission Process

Test Preparation

Financial Aid

TOEFEL Examination

Cool Interview Tips

Skill Check

Resume

GRE Examination

GMAT Examination


IT dart News Letter
Get ITdart.com weekly headlines before it's published on our site! Subscribe and receive the articles delivered to your inbox!

Coding conventions for VB5/VB6

Here are some useful coding conventions for VB5. Most of them are also applicable to other versions of VB.

Define all variables explicitly. Checking the Require Variable Declaration option under Tools - Options - Editor enforces this. Define variable-length arrays explicitly. (Visual Basic will not enforce this.)
Always specify the upper and lower bounds in an array definition.
Define consta nts, and use them in place of numbers in the code.
Always use the ByVal and ByRef keywords in parameter lists. Use ByVal where you have a choice.
Always use the Private keyword on functions and subroutines that are not exported from a module.
Define the types of all variables and function and subroutine parameters explicitly. For example, use Dim nBufSize As Integer instead of Dim nBufSize, and use Function nGetChars(nBufSize As Integer) As Integer instead of Function nGetChars(nBufSize).
Do not use implicit type suffixes (such as ! and &) in variable definitions.
In For loops, use Next instead of just Next.
Object Naming Conventions

The base objects which are inserted on forms are automatically prefixed. If you have modified these base controls into your own ActiveX controls, you should also follow similar conventions.

Here are a few examples: Control
Prefix
Example

3d panel
pnl
pnlMain

Check Box
chk
chkMarried

TextBox
txt
txtName

As these names are automatically suggested when you create a control on a form, it is easy to follow these. However when you create database objects, it is manually coded. Here is a list of suggested naming conventions for data objects:

Database object
Prefix

Container
con

Database
db

DBEngine
dbe

Field
fld

Group
grp

Index
idx

Parameter
prm

Query
qry

Recordset
rec

Relation
rel

Tabledef
tbd

Workspace
wrk



These conventions may sound elementary and obvious. However, naming conventions are easier to list than follow. In practice, unless every developer is committed to the code quality, readability and maintainability, these conventions are very difficult to implement on a long-term basis.

Unfortunately, a lack of conventions does not produce any syntax errors. Therefore, it is necessary to have personal and QA control over appropriate usage of such coding conventions.

One Click Courses

Advanced Certiflcate in Java Application Development

Advanced Cisco Router Conflguration

Advanced Course in Object Oriented Programming (Coop)

C#

C# with ASP.Net

CAD/ CAM

Certfication in Unix, C, C++ (CUCC)

Certificate in Advanced System Programming

Certificate in Java & E-commerce (CJEC)

EI -Strategiest

Object Oriented Developer and Designer

Specialization in 3D Graphics & Animation

Wap@Asset


Firewalls: What To Block

Windows System Architecture (WSA)

Operating System (OS)

Data Access Technologies

Functional menu-level blocking

Data Access Methodologies

ODBC Architecture

Learn Java from the ground up

Internet Security

The Day I Learnt JavaScript



ITdart Updates:
Computer Security | Computer Services | CRM | Database | E Commerce | Graphic & Design | Internet | Java | Knowledge Management | Linux | Online Marketing | Open Source | Operating System | Robotics | Semi Conductors | Software Downloads | Virus Info | WAP & 3G | Web Development | XML and Metadata
Home | Careers | IT Counseling | IT Jobs | IT Resources

© Copyright 1999-2000 ITdart.com. All rights reserved.
All brands are Trade Marks of Respective owners. Disclaimer    Legal    Privacy Policy