devxlogo

Tip Bank

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

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

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

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

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

Copying data into the Clipboard

Copying a piece of information into the clipboard is as easy as calling the Clipboard.SetDataObject: you can pass this method a string, an image, and so on. If you pass

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: