The Latest

DevX - Software Development Resource

Activate Single Control on All Tabs

A single object, employing a single set of event routines, may be used across all pages in the SSTab control. Draw the object on the form that contains the SSTab

DevX - Software Development Resource

Delegate Generic Event Handling

It can be useful to create generic controls of similar properties. For example, if a project has 10 textboxes on different forms that need to accept numeric input only, instead

DevX - Software Development Resource

Easily Determine Whether a Recordset is Empty

Use this quick and dirty routine to help find empty recordsets: Public Function IsEmptyRecordset(rs As Recordset) As Boolean IsEmptyRecordset = ((rs.BOF = True) And (rs.EOF = True))End Function Related Posts

DevX - Software Development Resource

Remove Unwanted Characters

When working with or fixing Access databases and Excel spreadsheets created by users at my company, I often have to use their strings from the table or spreadsheet to save

DevX - Software Development Resource

Executing a File Selected in Filelistbox

Question: I am trying to work out the coding to execute a file that I select in my filelistbox in Delphi 4. Can you help me? Answer: You can refer

DevX - Software Development Resource

Shared Database Session

Question: Is there a way to share a database session between calling application and DLL? Not having such a sharing (DLL with DataSet components) increases the number of SQL server

DevX - Software Development Resource

Trying to Modify an Original Program

Question: I commissioned a program that was written in Delphi. I am not a programmer, but an excellent hacker. Is there any way I can get into this program to

DevX - Software Development Resource

Fixed-Width Tables in IE5

Internet Explorer version 5 has significantly better HTML table support than previous versions. Up until now, HTML writers have had to rely on trial and error to make tables render

DevX - Software Development Resource

A Runnable Is Not a Thread

You may come across some situations where implementing a Runnable may have some advantages over extending Thread. If the class you are going to multi-thread is already extending another class,

DevX - Software Development Resource

Declaring Variables Inside an If-Condition

C++ allows you to declare variables just before their use rather than at the top of the enclosing block. Thus, it is legal to declare a variable inside the condition

DevX - Software Development Resource

Load a Text File Into a Memo

Question: How do I read a file on the A: drive into my program and then display the contents into an edit box? Answer: I’m not sure you’d want to

DevX - Software Development Resource

Descendants of TTreeNode Not Compatible

Question: I am having troubles with the TTreeView component and adding custom derivations of TTreeNodes to it. I want to define a new type of TTreeNode with a lot of

DevX - Software Development Resource

Refreshing the Desktop

Question: How do I refresh the desktop after I draw on it? Answer: Simple: call the Invalidate method for your form, and the window will refresh. Related Posts Making a

DevX - Software Development Resource

Type-Declaration Characters

Question: I’m having problems passing variables to an API function. I always receive a Type mismatch error. I reproduced the situation in Visual Basic and found that if I used

DevX - Software Development Resource

Different Versions of Delphi and the BDE

Question: Is it possible to have two different versions of the Borland Database Engine (BDE) installed on the same machine? I’ve been developing in Delphi 3, recently went to Delphi

DevX - Software Development Resource

Open Database Error

Question: I am updating an application that was developed to make an executable test version. However, the live database is opened, not a test database. I have made a test

DevX - Software Development Resource

Drop Word Documents Into FrontPage 98

If you have a Microsoft Word document that you want to insert into an HTML page in FrontPage 98, you don’t have to open Word to convert to HTML. With

DevX - Software Development Resource

Writing an Event Producer

An event producer is also known as the “source” of the event. Java does not define a base class or an interface for the event producer. However, the Listener design

DevX - Software Development Resource

Implementing the EventListener Interface

The EventListener interface is a marker or tag interface that doesn’t define any methods. Its purpose is to provide a base interface for all event listener objects that follow the

DevX - Software Development Resource

Automate E-mail with VBScript

If you have Simple Mail Transfer Protocol (SMTP) installed with Internet Information Server (IIS), you can automate e-mail through VBScript. The Collaboration Data Objects for Windows NT Server (CDONTS) component

DevX - Software Development Resource

Detecting Double-Clicks

When creating a Java GUI, it is often the case that you want some action to be taken when the user double-clicks on some component. Although there is no simple

DevX - Software Development Resource

Helpful VBScript Date Functions

VBScript has some neat date functions. For example, if you want to display a database date field such as “3/14/99” as “Sunday, March 14, 1999”, try this code: Dim dtTemp,

DevX - Software Development Resource

Applying CSS Styles Across Your Entire Site

Using Cascading Style Sheets (CSS), you can easily create styles that apply to the entire site. This technique has many advantages over repeating the same style text over and over

DevX - Software Development Resource

Hashtable Key Replacement

Most Java programmers know that adding an object to a Hashtable using a key already stored in the Hashtable will cause the previously-added object to be “dropped” from the table

DevX - Software Development Resource

Prefer Initialization to Assignment of Objects

In general, assignment requires the creation and destruction of a temporary object, whereas initialization does not. This is true for not just for strings, but for every object type, so

DevX - Software Development Resource

Simulating Virtual Constructors

A constructor may not be declared virtual. The easiest way to simulate virtual construction is by defining a virtual member function that returns a constructed object of its class type:

DevX - Software Development Resource

Member and Non-Member Overloaded Operators

Most of the overloaded operators can be declared either as non-static class members or as non-member functions. In this example, operator == is overloaded as a non-static class member: class