Tip Bank

DevX - Software Development Resource

Avoid Errors on Assigning Null Values

Whenever you read a database field, concatenate an empty string to the field value before assigning it to a variable or control property. This prevents the program from giving an

DevX - Software Development Resource

Passing ByVal to ByRef Parameters

By default, VB passes all arguments to a procedure by reference, which means the procedure can change the values of the variables you pass. However, there

DevX - Software Development Resource

Center Your Logo on MDI Forms

You can display a logo in the middle of your MDI form. The logo stays in the middle even when the MDI form is resized. After creating your own MDI

DevX - Software Development Resource

View the Right Side of a Truncated String

You see trailing ellipses (…) when VB truncates either the expression or data portion of a data tip (the mouse-hover watch value you get while debugging). This is great if

DevX - Software Development Resource

Determining the Angle Between Two Lines

In graphical applications, you often need to know the angle between two lines. You can move their intersection point to the origin easily, so all you need to do is

DevX - Software Development Resource

Showing and enumerating MDI child forms

An MDI child form is a regular form whose MdiParent property points to its MDI container form, so the code that creates and displays a child window is very simple:

DevX - Software Development Resource

Multi-column menus

The new Break and BarBreak properties of the MenuItem object let you create menus with multiple columns. All you have to do is set either property to True for the