devxlogo

Tip Bank

When can an empty class be useful?

A class containing no data members and no member functions is an empty class. It’s defined like this: class PlaceHolder {}; What’s it good for? It can serve as a

Invoking a JavaScript Function

For the two major browsers, the easiest way to invoke a JavaScript function is create a java.net.URL instance using the JavaScript: protocol handler. To invoke the JavaScript command, pass the

Display Horizontal Scrollbar

Unlike the Windows 95 common controls, the standard list box doesn’t have a horizontal scrollbar when list items are too wide to fit within the list box. Fortunately, it’s not

Get the True Member of an Option Array

Setting an element in an array of option buttons to True is easy. Click on the option button, or use this code: OptionArray(ThisOne) = True ThisOne is the Index of

Browser Detection from Applet

The Java core API includes a class called java.lang.System from which system dependent operations can be performed. One of the methods of the System class is getProperty(String) which will return

Protect Data Within Modules

Use Private variables in BAS modules to protect data that the module’s routines must access, but which should be hidden from the rest of the application: Dim hidden_data As IntegerFunction