devxlogo

The Latest

A general base class – is it such a good idea?

In many frameworks and software projects, all classes are enforced to be descendants of one common generic class, usually named Object. This design policy prevails in other OO language such

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

Convert a Text File into Access MDB

It can be troublesome to convert a text file into an Access database. It takes a lot of time to open the file for sequential access and create new records

Debug Error Handlers

Visual Basic gives you the option to turn off error trapping in your projects. This is useful when you suspect that your error handlers contain errors themselves. To turn off

Quick and Easy SCHEMA.INI

To create a SCHEMA.INI file for a text file quickly and easily, let the ODBC setup and drivers do it for you. Go to the Control Panel and start ODBC.

Use Boolean Variables for Check-Box Values

Visual Basic specifies a Boolean’s default values as zero for False and -1 for True. You may save and set the value of a check box, based on the absolute

SQL and Tables

Question: If I have a table open, can I execute SQL.Open?I was going along fine querying different tables, but now I have a table.open and am trying to query the

Who Has File Open on NT Server?

Want to know who has a particular file open on your NT Server? In NT 3.51, you could use File Manager to select a file on your server, use the

Estimating Resource Percent Allocation

When generating project plans or timelines, never consider a resource as being 100% available. Most tracking tools allow you to put in the resource percent allocation. Even if someone is

Center Page Vertically

Question: How do I center a page in a window vertically, without using returns or tables? Answer: It’s easy to center the page horizontally–all you need to do is use

Resizing Images on the Fly

Question: I know that with DHTML, it is possible to resize images using the Onmousover event handler, but the example shown on the Microsoft Dev site involves basically switching between

Changing screen resolution

Question: Is it possible to change the screen resolution to 640*480 before my project runs and change it back when the program exits. Or is there another way of rearanging

Visual J++ 1.1 and Java 1.1

Question: I am using MS Visual J++ 1.1 1997 and it doesn’tcontain the java.util.Calendar class and java.text.* packages that you reference in the answer to another question. How do I

Offscreen buffer

Question: I want to create an offscreen buffer in a Java application, but I don’t know how. Answer: You can create an offscreen buffer by usingthe createImage(int,int) in java.awt.Component.This is

Converting String to double

Question: How can I convert a String to a double and backagain? Answer: You can use the java.text.NumberFormat classto convert a String to a double and back again.Use the parse(String)

Always Use Relative Paths

No matter what language you are developing in, or whether you are developing programs or Web pages, never hard code paths to files that include drive letter distinctions (i.e. N:Images).

SQL Feature to Integrate with COM Objects

SQL Server has a very powerful, but often overlooked, feature to integrate with COM objects. SQL itself can create COM objects from within Triggers or Stored Procedures, apply property values

Utilize Version Control Mechanisms

If you are using SQL server, consider utilizing version control mechanisms for your triggers and stored procedures. Many times I have heard people wondering about changes to a procedure or

Scheduled Walkthroughs and Reviews

Successful development groups implement regularly scheduled walkthroughs and reviews. I have found three common types: Code Walkthrough – At various points during the development life cycle, the developer or project

Bandwidth-Friendly Separator Bars

If you want to create good-looking separator bars but aren’t satisfied withsolid colors or the download time of fancy graphical bars, try this easy andbandwidth-friendly method. Create a gradient image

Avoid URL Root Name Dependencies

To avoid having to use a specific root name in your URL references, put allof your files except the default file (and global.asa if you’re using ASP)in named subdirectories and

Keep Anchor Tags from Changing Color

Anchor tags usually change color after they have been “visited.” You cankeep this from happening in your site by using this style tag at the top ofeach document. Related Posts