February 4, 1999

Using Expandable Outlines in Netscape

Question: I’ve written a page that uses expandable outlines using the display property of SPAN objects and it works fine in Internet Explorer 4. However, Netscape does not seem to use this property of SPAN objects. Is there any way to use expanding outlines in Netscape 4? Answer: Expandable outlines

Trouble With String That Contains a Backslash

Question: I get a string from the Microsoft Index Server like this: “Information uber”. If I try to assign this string to a variable I get a runtime error: “Invalid character.” var str = ” I think the problem is that there’s only one backslash in this string, and so

Compute Credit Card Check Digits

The last digit in your credit card number is a check digit derived from the other digits using the Luhn Formula as described in ISO/IEC 7812-1:1993. Its primary purpose is to ensure accurate entries of the credit card number during transactions. You can apply the same technique to other applications

Include Code for Debugging

VB supports conditional compilation, just like Visual C++. However, Visual C++ has a predefined constant named _DEBUG that makes it easy to include code only while debugging, as in this code: #ifdef _DEBUG MessageBox(NULL,”Begin Procedure”, _ “Debug Message”,MB_OK);#endif In VB, you can do the same thing, but you need to

Add Color Coding to Include Files in Visual InterDev 6

Visual InterDev 6 colors HTML and script to make it easier to pick out the type of code and syntax errors. However, many programmers put frequently used routines in an include (.inc) file which Visual InterDev doesn’t interpret as script. You can get color coding to your include files by

Nix the X

Sometimes, you want to show a form that you don’t want users to be able to cancel by clicking on the X-it might not make sense for your app. The best VB solution is to cancel the unload in the form’s QueryUnload event. However, this allows users to do something

Use This Higher-Resolution Stopwatch

Use this code to create a class called HiResTimer: ‘The number is codified as HighPart*2^32+LowPartPrivate Type LARGE_INTEGER LowPart As Long HighPart As LongEnd TypePrivate Declare Function QueryPerformanceCounter Lib _ “kernel32” (lpPerformanceCount As LARGE_INTEGER) _ As LongPrivate Declare Function QueryPerformanceFrequency Lib _ “kernel32” (lpFrequency As LARGE_INTEGER) As LongPrivate m_TicksPerSecond As DoublePrivate

Prevent Checkbox Changes

You’ll often want to display a checkbox-style listbox to show users the values they have selected in an underlying database. However, you don’t want to allow users to change the selections-that is, to change which boxes they checked. You can’t disable the listbox because that stops the user from scrolling

Call Up Windows Shell Features

Here’s a little routine that provides a quick and dirty way to call up some of the more oddball features of the Windows shell. It works by emulating user keystrokes, so you’ll need to modify the keys for non-English versions. Simply paste this code into a standard module and pass

No more posts to show