The Latest

DevX

Set Up Useful Shortcuts in the Send To Folder

If you develop applications that use components that need to be registered, consider setting up a shortcut to regsvr32 in the “Send To” folder on a user’s machine as part

DevX

Better Alternatives to Macros

Macros in C++ are better avoided. They are unsafe, hard to debug, and may bloat your .exe files. C++ offers significantly better alternatives to them: 1. Function-like macros should be

DevX

Before You Resort to Void *…

Void * can serve as a generic data pointer, yet it suffers from the well-known ailments associated with pointers: it can be NULL or a dangling pointer. Furthermore, it usually

DevX

Default Template Argument

Like ordinary functions, templates can have default type arguments. A good example is STL’s vector. It actually has two arguments–the second one is an allocator class template. Since an allocator

DevX

Let the User Control Long Operations

To allow the user to control long operations, use a single CommandButton to control starting and stopping a looping process: Dim Running As BooleanPrivate Sub CmdStartStop_Click() If Running Then ‘

DevX

Pass Parameters to User Dialogs

It’s fairly common practice to add buttons to your date and numeric fields to allow users to select and display a popup calendar or calculator. However, to display a calculator

DevX

A Better Way to Swap Two Integer Variables

The algorithm shown in the tip, “Swap Values Using Only Two Variables” [“101 Tech Tips for VB Developers, Supplement to the February 1997 issue of VBPJ, page 25], crashes not

DevX

Use Arrays, Not Collections

Arrays take less memory and are faster than collections. If you don’t need to use a collection’s keyed lookup, easy extensibility, and other features, use an array instead. Related Posts

DevX

Draw Complex Shapes

You can create complex shapes easily if you have a copy of Microsoft PowerPoint, CorelDraw, or any other graphics editor. Using your graphic editor’s drawing tools, draw the shape you

DevX

Don’t Show me the Hourglass

When creating applications, especially on an enterprise scale, don’t create them so that they run start to finish, tying up the user’s PC needlessly. If all you need is two

DevX

BDE Configuration

Question: I’ve developed a database using Microsoft Access, exporting the files to a Paradox 5 format. Now, the application I’ve developed that utilizes this database is currently running on two

DevX

Putting Hints in Status Bar

Question: I am using the application.onhint example from the Delphi help files to put all hints in my status bar. It works on all but one form. I’m using the

DevX

JavaScript Compatibility

Question: As a Web designer, one of my biggest struggles is JavaScript compatibility with previous browser versions (such as IE3, IE4, N2, N3, and N4). Is there a way I

DevX

Related Database

Question: I’m trying to make outer join by the query builder in Delphi 2.0 but the only active option is inner join. I want to use left outer join and

DevX

Running an EXE file via a Delphi App

Question: I want to be able to run an EXE file on a button click in one of my Delphi applications. Is it possible to do this? Where do I

DevX

Component Events

Question: How can I add a new event to an existing component (for example, OnScroll to a TTreeView) without building a new ComponentClass? Answer: You can replace existing event handlers

DevX

Increase Query Performance

Question: I have a form that uses one data source and one query component. The data set of the data source is the query. Depending on the process, I assign

DevX

Find Trouble Spots

Implement a low-tech trace of your application by writing a message whenever your code enters and exits a subroutine. This can help you locate elusive bugs, because you can turn

DevX

Determine Next/Previous Weekday

This function returns week identifier information, such as Week Beginning/Ending date, and makes it more generic to return a date of any previous or following weekday. You can use this

DevX

Let the Editor Check Your Spelling

To make certain that you declared your variables, place Option Explicit in your Declarations section. Using a mixture of upper and lower case in variable names, you can easily verify

DevX

Create DLL from PB

Question: I have an application with a lot of business logic in nonvisual objects that I’d like to deploy as DLLs callable as standard windows DLLs from applications written in

DevX

DCOM and Win NT Workstation

Question: How many DCOM connections can I have on a Windows NT Workstation? (Does it have a limit of 10, like in shares?) How is performance affected when 20 users

DevX

DBENGINE – 16 bit

Question: I need to use the BDE in a Windows 3.11 environment. My Delphi 1 system does not include BDEINST material, although the help files refer to it. How can

DevX

Simulate Win95 Taskbar Within Your App

The Windows 95 taskbar (with the Auto Hide check box set) is quite attractive and provides a compact, nonintrusive way to access and organize information. You can easily simulate this

DevX

VB Version IsDate Differences

Under VB3, IsDate returns True only if the string corresponds to the date format indicated by the “Regional” or “International” settings in the Control Panel. Under VB4 and VB5, however,