devxlogo

Tip Bank

Exception Handling Misuses

Exceptions can be used as an alternative control structure in addition to for-loops or while-blocks. For example, you can use exceptions to implement a simple application that prompts the user

Timely Capture of Font Metrics

If you extend an AWT class to add text to a GUI component, then you probably need access to the font’s metrics so that you can deduce the amount of

Directing CGI Output to Another Frame

A little-known attribute of the tag is TARGET. This attribute can be used to direct the output of a CGI program to another browser window, or another frame in the

Developing E-Mail System

Question: I want to develop a free e-mail system similar to what Hotmail and Yahoo offer. I was wondering if you could give me some ideas on how to approach

Determining Shift Button State

Question: How can I determine if is down or up while dragging an object within my app? The goal is to detect if something is being copied or moved. Answer:

STL Containers Should Not Hold auto_ptr<> Members

During reallocation, a container re-constructs its elements in a new memory location and destroys the original elements by invoking their destructor. Since the destructor of auto_ptr deletes its bound object,

Using Files as Persistent Flags

In Java, static variables may be used as flags to maintain state between different instantiations of a class (see Tip: “Using Static Variables to Store State Across Instantiations”). However, the

GetWindowsDirectory API 16 bit to 32 bit

Question: I have migrated an application from 5.0.03 to 6.5 and continue to get this error when pressing the Run button: Error – 14 – Error opening DLL library kernel.exe