The Latest

DevX - Software Development Resource

Watch Out for “()” When Calling Subroutines

To call a subroutine, you can use the Call statement or simply the name of the subroutine: Call MyRoutine(firstParameter) ‘Or MyRoutine firstParameter Notice you don’t include the parentheses in the

DevX - Software Development Resource

Collect User Requirements With Scenarios

When talking to the user or subject-matter expert about an application’s requirements, write the requirements in the form of scenarios. A scenario both defines the requirement and provides a list

DevX - Software Development Resource

Browse VB Command as You Type

When you refer to an object in VB5, you get a drop-down list of that object’s properties and methods. But, did you know that the statements and functions of the

DevX - Software Development Resource

Use the Same Name for Your Error Handlers

Older versions of VB required a unique name for your error-handler labels in order to use On Error GoTo . You had to concatenate the module name and routine name

DevX - Software Development Resource

Find Your Constant or Enum Values

I use constants for things like control-array index numbers, but it’s a hassle to keep scrolling to the top of the module to remember the constant names. If you name

DevX - Software Development Resource

Get Your Graphics Here

If you extend a few AWT classes, you will eventually want to add images to enhance their appearance. Icons for buttons and your own logo in the corner of frames

DevX - Software Development Resource

Create a DHTML Combo Box

In Visual Basic, the standard combo box lets you store an Index to its data. For instance, a user would see in the list an employee name but not an

DevX - Software Development Resource

Netscape DIV Tags

Question: How do I make the contents of one DIV (divA) equal to the contents of another DIV (divB) in Netscape? I know that in Microsoft Internet Explorer the code

DevX - Software Development Resource

Challenge With JavaScript and Frames

Question: I would like to put my entire alternative no frames content in the NOFRAMES element instead of just a link to it. The advantage to this would be a

DevX - Software Development Resource

DDE and HTML

Question: How can I get data from a Dynamic Data Exchange (DDE) server and display it in a Web page? On a Visual Basic form, I can use a text

DevX - Software Development Resource

Avoiding Tab Traversal for Non-Editable TextFields

To prevent a component from getting the focus when the Tab or shift-Tab keyboard focus traversal is used, override the isFocusTraversable method. It is often desirable to toggle a TextField

DevX - Software Development Resource

Exploring Table Information

Question: How do I interrogate tables randomly and print out their structures, components, sizes, and indexes? This ability would be useful in allowing me to check how I have created

DevX - Software Development Resource

Is Delphi the New Pascal Compiler?

Question: I’m leaving Turbo Pascal for Windows 1.5 and Turbo Pascal 7.0 because they don’t work correctly with Windows 95 (for example, division by 0). I heard that Delphi is

DevX - Software Development Resource

Obtaining the Version Information

Question: The VS_VERSIONINFO structure can be used to obtain file version data about files with extended version data. This structure is not included in Delphi 4.0, nor is it included

DevX - Software Development Resource

Reduce the Clutter in Your VB IDE

Here’s another simple but useful add-in you can add to your arsenal. Follow the directions given in the previous tip “Add Remarks to Your Procedures,” with only minor differences. Use

DevX - Software Development Resource

Hide Enumerations for Validation

VB5 introduced support for enumerations, which are related sets of constants. Although you can declare a property as an enumerated type, VB lets you assign any long integer value to

DevX - Software Development Resource

Component Fails When Used Within ASP

Question: I am working on system that is built from many pieces, but they all use certain common settings. I developed a simple ActiveX DLL that reads those settings from

DevX - Software Development Resource

Determining Client Information

Question: I am trying to set up a small intranet and was wondering if there is a way to determine the client’s workstation name (for example, Computer Name in Control

DevX - Software Development Resource

Displaying Exceptions’ Description

Standard exception classes are derived from std::exception (defined in the header). They all implement the member function what(), which returns a const char * with a description of the exception:

DevX - Software Development Resource

Easily Assign Containers

STL containers overload the assignment operator, thereby allowing you to easily assign containers of the same type to one another: #include #includeusing namespace std;void main() { vector vi; vi.push_back(1); vi.push_back(2);

DevX - Software Development Resource

Where is That Serialized Hashed Key?

When serializing a Hashtable in Java, make sure that the keys used to store objects are either primitives, or the key class’ hashCode() method overrides the superclass Object’s hashCode() method.

DevX - Software Development Resource

Customize Your 404 Page

Even if your Web site is rock-solid with no broken links on it anywhere, chances are someone is going to see a 404 File not Found error page someday, if

DevX - Software Development Resource

Sorting a Two-Dimensional Array With <=>

The Perl sort function is useful for alphabetically sorting lists. However, you can’t use it on a list of lists, because once a list starts listing other lists, they cease

DevX - Software Development Resource

Serializing and Deserializing Objects

The serialization mechanism in Java provides the means for persisting objects beyond a single run of a Java program. To serialize an object, make sure that the declaring class implements

DevX - Software Development Resource

Display Read-Only Data on Your Web Pages

You can do a lot of cool things using Microsoft’s Remote Data Services (RDS). For example, have you ever wanted to display a field from a database table read-only in

DevX - Software Development Resource

Non-Virtual Multiple Inheritance

Virtual inheritance is used to avoid multiple copies of a base class in a multiple-inherited object. However, there are cases where multiple copies of a base are needed in a