The Latest

DevX

Fly the Flag

The clock applet that comes with Microsoft Plus! has an interesting feature: Its window is round instead of rectangular. Surprisingly, giving your form an odd shape is easy. Add this

DevX

Watch the Parens

If you want to pass a parameter to a subroutine, use this code: Call doFormat(txtPerson) You can also call the subroutine without the Call statement. However, if you don’t include

DevX

Dictionary Has Advantages Over Collections

The Dictionary object can contain items, which can be any form of data, just like a collection. However, the Dictionary object has many advantages over a collection. It allows retrieval

DevX

Display Two Fields

Let’s say you want to bind your listbox to a recordset, but you also want to display two fields concatenated together, such as “Jones, Barbara.” You can do this by

DevX

Encrypt a String Easily

This quick and dirty encryption/decryption function takes whatever string you pass it, assigns it to a byte array, Xor’s each byte by a constant, then returns the string. The offsetting

DevX

Create a Remote Object Without Extending UnicastRemoteObject

When using Java’s Remote Method Invocation (RMI), you may have defined a server class that extends java.rmi.server.UnicastRemoteObject. Extending UnicastRemoteObject makes your class capable of handling incoming calls, and is acceptable

DevX

Avoid Gigantic Classes

Several small and specialized classes are preferred to a single bulky class that contains hundreds of member data members and member functions. More than once I’ve seen programmers extending a

DevX

Specifying Position When Adding Components

The java.awt.Container class provides a number of different overloaded versions of the add() method which are used to add components to the container. The integer value specified with the add(Component,

DevX

Keep Indexes Separate From Data

You can boost your performance greatly by separating indexes and data onto different physical disks, which allows both the index and data to be accessed at the same time. However,

DevX

Counting the Occurrences of a Substring

VB6 has introduced the Replace function, which replaces all occurrences of a substring with another substring. Although this function is useful in itself, you can also use it in unorthodox

DevX

Maximum number of controls on a form

Question: VB limits the number of controls on a form to 255. How do you get around this without dynamically creating and displaying them or frames that contain them? Basically,

DevX

Saving VB 6 Files for VB 5

Question: The computer lab where I’m taking a course has Visual Basic 6.0 now. Is there some way to save a VB 6.0 project so that it will be compatible

DevX

Unloading Application from Memory

Question: I have written an application that uses both DAO and OLE calls. This is a form-based application that sits on top of a CAD package. Sometimes when a user

DevX

Menu Security

Question: I am building a security program for a high school in my area. I need a way to allow the teacher to select menus in programs she does not

DevX

Backward compatibility

Question: Is it possible to convert a VB 6 file to a VB 4 or 5 file? Answer: Sorry, I can’t tell you exactly how to do it. But I

DevX

Accessing graphics file from VB

Question: I need to store thumbnail graphics in an Access database (as an OLE object?) and be able to display the columns including the graphic in a table or grid.

DevX

How to use Properties

Question: I’m trying to set and save user preferences for an application to a local file. The java.util.Properties class looks like what I want, but I don’t understand how to

DevX

Object Oriented Databases

Question: How well can Visual FoxPro be a front end for object-oriented databases? Are there any in particular that work well with VFP? Answer: I am not familiar with any

DevX

Getting the active window

Question: I am using VC++ 5.0 to develop applications based on Windows 95. I want to get the HWND of the active window, which is receiving the keyboard or mouse

DevX

Smart Pointer

Question: Could you give me an exact definition of smart pointers, and how does a reference counting smart pointer work? Answer: I don’t believe there is an exact definition, since

DevX

Versions 5 and 6

Question: Can you have both versions 5 and 6 of FoxPro installed and make applications that work with either versions 5 or 6? I want to make an app for

DevX

MFC / Event Driven-Programming

Question: I’ve written a program using MFC that uses toolbars. I have an event that I want to change the state of some of the toolbar buttons (disable them, to

DevX

Bringing another application to the foreground

Question: How can I bring an open application to the foreground (that is, move the PowerBuilder app back a layer). Answer: To bring another application to the front, you will

DevX

Performance

Question: I have two Visual FoxPro applications (App1 and App2) running in the same computer. App2 runs every 30 minutes. When App2 runs, App1 is slow because App2 consumes lots

DevX

Access UserControl.left and UserControl.top

Question: How can I access the usercontrol’s left and top properties from within the user control? Answer: Certain standard properties such as top and left are provided to a control