May 2, 1999

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 use it. Answer: The Properties class is a Hashtable intended only to store strings. Rather than use the Hashtable put

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 object-oriented databases. VFP can access (through remote views) anything with an ODBC connection. If there is an ODBC driver for

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 input and is a child window of the foreground window. I used ::getactivewindow(), but it can get only the window

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 I think you’ll find variations on its use. But the basic idea is to use encapsulation within a class to

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 a customer who has version 5. When I compile the code, will FoxPro pull files that were loaded from 6,

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 be exact), and I also want this event to cause an Object in my CDocment class to be drawn. The

Integration with Word97 Adding Page Number

Question: I am attempting to use OLE between PB5 and Word97. I want to add two fields into the header of the document. I want to add the Page number and the Section Number. I have used Word6 and used the InsertField function to add a “PAGENUM” field. Now, using

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 need to use some API calls. Create a user object in PowerBuilder and define the following API calls: function long


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 of CPU and memory. Can I limit the resources for App2 so that App1 won’t slow down? And, can I

No more posts to show