December 23, 1998

DHTML Window Redraw

Question: Is there any way to control the redrawing/repainting of the open window/document? Specifically, I have to change page elements (labels, cursor style) before calling some time intensive task. I have successfully implemented changes to the cursor style but it doesn’t always change the display of the mouse cursor immediately.

Create Page Breaks in an HTML Document

Question: Is there any way (using an HTML tag or a script) to force a page break at a certain point in an HTML document when it is being printed? For example, my Web page is about five printed pages long. When it is being printed, I would like to

Arrays are Cheaper and Safer than Vectors

In Java, you can use either a Vector or a one-dimensional array to store an ordered collection of objects. The difference between the two types of storage is that the array allocates storage for a fixed number of elements where as the Vector can grow dynamically. Another difference is that

Exception Specification is not Part of a Function’s Type

An exception specification is not considered part of the type of a function. Therefore, you cannot declare two distinct functions that differ only in their exception specification: void f(int) throw (Y);void f(int) throw (Z); //error; redefinition of ‘void f(int)’ For the same reason, declaring a typedef that contains an exception

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 begin typing and executing code: Set c = new Class1 ? c.TestProperty

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 shorter and accomplishes the same task with no DLL calls: Public Function SpecificWeekday(ByVal D As Date, Optional _ ByVal WhatDay

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 to True, the Minimize and Maximize entries in the context menu are visible-but the buttons are still invisible! To fix

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 ExpirationDate = #4/1/98# ‘This particular document expires on 1 April 1998 If Date >= ExpirationDate Then ‘Purge the document With

No more posts to show