devxlogo

Tip Bank

Quick Class Tests

When testing properties and methods of an object that you’re writing, you don’t have to run a test project or form to test it. Instead, open the Immediate window and

A Quicker “Next/Previous Weekday”

In the latest tips supplement [“101 Tech Tips for VB Developers,” Supplement to the February 1998 issue of VBPJ], I noticed a tip titled “Determine Next/Previous Weekday.” This code is

Make Buttons Appear

VB doesn’t display the Min and Max buttons in a form’s caption area when you specify BorderStyle Fixed Dialog. If you set the MinButton and MaxButton properties on the form

Remove Min/Max Buttons From MDI Form

Unlike other forms, MDI forms don’t have MinButton and MaxButton properties to enable or disable the form’s Minimize and Maximize buttons. If you add this code to an MDI parent

Zap Expired Docs

This VBA Microsoft Word routine purges a document when it’s opened after a predefined expiration date. I’ve only tested this macro with Word 97: Sub Purge() Dim ExpirationDate As Date

Java’s Alternative to Function Pointers

Although Java borrows a lot of concepts and syntax from C++, it also leaves out some of C++’s main features to meet its goal of simplicity. For example, Java excluded

The Lifetime of a Bound Temporary Object

You can safely bind a reference to a temporary object. The temporary object to which you bind the reference persists for the lifetime of the reference. class C { int