The Latest

DevX - Software Development Resource

Get the list of ODBC DSNs

The ODBCTOOL.DLL library contains three functions that make it easier to manage DSNs. To run the following code you must add a reference to the “ODBC Driver & Data Source

DevX - Software Development Resource

Add a file to the list of recent documents

The Windows shell provides a function that lets you add a file to the list of the recent documents, that is the list that you can access from the Start

DevX - Software Development Resource

Change the ShowInTaskbar property at runtime

The ShowInTaskbar property lets you decide whether a form is visible in Windows taskbar or not. However, this property is read-only at runtime, so it seems that you can’t change

DevX - Software Development Resource

To Virtual Or Not To Virtual?

You’re probably aware of the overhead that is associated with calling a virtual member function. However, the performance penalty in this case might even be higher than you think because

DevX - Software Development Resource

Don’t Confuse delete With delete []

There’s a common myth among Visual C++ programmers that it’s OK to use delete instead of delete [] to release arrays built-in types. For example, int *p = new int[10];

DevX - Software Development Resource

The MsgHookX ActiveX DLL for Subclassing

The MsgHookEx DLL is an ActiveX component written in VB6, that lets you perform safe and efficient subclassing even from within the Visual Basic IDE in debug (break mode). This

DevX - Software Development Resource

Track Clicks on Element With Expando Property

Browsers Targeted: Internet Explorer 4 and 5 With Internet Explorer 4.0 and above, you can create an arbitrary property on any HTML object. This property, called an expando property, stays

DevX - Software Development Resource

Using the SetTimeout() Function

Browsers Targeted: Internet Explorer 3+, Netscape 3 and 4 Sometimes, you need to set up events to happen at periodic intervals. Perhaps the simplest application of this is a clock.

DevX - Software Development Resource

Recursively Delete Directories in Java

In Java, a readable, writable directory should be empty before an attempt is made to remove it. The following code recursively empties a directory, and its sub-directories, and then removes

DevX - Software Development Resource

Resize Applets in Browsers

With applets, sometimes the browser acts as the applet’s frame. This prevents the user from mistaking the browser window for a separate application and closing it. With this approach, the

DevX - Software Development Resource

Textfield With Limited Length Of Characters

Sometimes it is useful to have a text field, for which you can specify a max number of characters. The following class give you just that: import java.awt.*; import java.awt.event.*;

DevX - Software Development Resource

Add Background Image to JTable

You can easily add a background image to swing’s JTable. The following code shows you how: Note that the image scrolls with the table. public class BackgroundTable { public static

DevX - Software Development Resource

Get Rid Of Unreadable Characters

Line separators are dependent on the operating system. This may cause some annoyance when opening files created on another operating system. For example, if you are using Microsoft Windows, and

DevX - Software Development Resource

Provide Data Tip For JTable Columns

Cell data in a table may exceed the width of its column. It is a good, user-friendly, idea to have ToolTips appear in a cell showing the entire cell data

DevX - Software Development Resource

Java’s Division and Modulus Operations

In Java you take the remainder with the modulus (%) operator, whereby the sign of the remainder follows the dividend, not the divisor. So (+5 % -2) will be, to

DevX - Software Development Resource

CSS Properties: Display vs. Visibility

Browsers Targeted: Internet Explorer 3+ It’s fairly easy to confuse the Cascading Style Sheets (CSS) properties display and visibility, because it would seem that they do much the same thing.

DevX - Software Development Resource

Informix and ODBC

Question: I have an Informix database on a remote server and I’m trying to perform ODBC from my client machine. I have installed the client products on my Windows 98

DevX - Software Development Resource

Finding Sqexplain.out

Question: I can’t find the sqexplain.out file. Where is it? Answer: In UNIX systems, this file is usually placed in the directory from which you called the dbaccess or other

DevX - Software Development Resource

Am I in the IDE?

Question: Is there a simple test that can determine whether a VB program is running in the IDE or as a compiled exe? Answer: Yes there is a very simple

DevX - Software Development Resource

Set Your Pages’ Content Ratings in IIS

Content ratings help your users?especially families?know what type of content your site provides. Microsoft Internet Information Server (IIS) 4 lets you add content ratings to any page. Try this: In

DevX - Software Development Resource

Turn Off Sessions in Active Server Pages

Session variables are a boon to ASP developers because they allow you to maintain variables from one page to another. However, the use of session tracking may make Internet Information

DevX - Software Development Resource

Correctly Declaring Global Objects

Although the use of global variables is not recommended in general, sometimes it’s unavoidable. When using a global variable or object, never instantiate it in a header file because the

DevX - Software Development Resource

Case-insensitive Comparison of Strings

Class std::string’s overloaded operator == performs a case-sensitive comparison. This means that the following strings are not identical when compared using ==: string s1 = “Jellylorum”; string s2 = “JellyLorum”;

DevX - Software Development Resource

Static Initialization and Dynamic Initialization

C++ distinguishes between two initialization types for objects with static storage duration (global objects are an example of objects having static storage). Static initialization consists of either zero-initialization or initialization

DevX - Software Development Resource

Avoid Redundant Parentheses in Object Instantiation

Although the following statements are semantically equivalent string * p = new string(); //with empty parentheses string * p = new string; //no parentheses The second one is preferable for

DevX - Software Development Resource

Updating the End Date Field

Question: I have written the following SQL statement and want to update only the end date field (saaphy01.n5ajdd) in one file. How can I tell it in my query to

DevX - Software Development Resource

Double-Count in a SQL Query

Question: I want to create two count-variables in one SQL query based on GROUP BY signum_chef. Is that possible? I’ve tried something like this: SELECT DISTINCT signum_chef, Antal=(SELECT COUNT (*)),

DevX - Software Development Resource

Exchange Client vs. Outlook

Question: What is the difference between Microsoft Exchange and Outlook? We only use Exchange on our workstations, but I have an icon on my desktop for Outlook. Please explain. Answer: