Open a file that’s already opened in the editor

In versions prior to VFP7, if you open a file in the VFP editor, you couldn’t do anything else with the file in another process. For example, you couldn’t switch to another process like Windows Explorer and copy it or open it with notepad.   For VFP7 I changed this behavior so that the VFP…

3

Collection as Rowsource in Listbox

Here’s some sample code for a new feature in VFP9: the Listbox Rowsource can be a collection, and can even specify collection members for multiple columns:     CLEAR ALL CLEAR PUBLIC ox as form PUBLIC oc as Collection USE HOME()+”\samples\data\customer” oc=NEWOBJECT(“collection”) #define USEOLE 1 #if USEOLE #define NUM 4 DIMENSION ofrm[NUM] FOR i =…

1

Inspect your memory image and see fragmentation

The VirtualQueryEx function can help to inspect the memory of a particular process. It returns information about the various memory pages allocated to a process. If a block is marked as MEM_IMAGE, it’s a loaded module, like an EXE or DLL, so you can use the GetModuleFileName function to find the full path of the…

4

GetEnv Environment Variable question

I received a question:   Can you explain me the internal behavior of VFP’s GetEnv() function. It’s seems to me that VFP during startup make a copy of environment block and GetEnv() works with this internal buffer. So using WinAPI’s SetEnvironmentVariable and GetEnvironmentVariable do not change behavior of GetEnv() function. And what about behavior of…

2

What’s the greatest invention of all time?

I read this from Raymond, which prompted this post. To qualify for greatness, an invention would have to affect the most people and benefit humankind in a big way   When pondering this question, I’ve heard things like:   Wheel Transistor Computer Printing Press Vaccines In4ternal combustion engine Cars Planes Sandwich Language Internet Tablet PC…

37

Use Named Pipes to communicate between processes or machines

Pipes have been useful for decades for interprocess communication. At a Windows Command prompt, you can type “dir | more”, which just creates a pipe between the DIR command and the MORE command. The standard output for the left side of the pipe is redirected through a pipe to the standard input of the MORE…

12

What is a Microsoft MVP? Calvin’s List updated for the new century

In this definition of Microsoft MVP on the Wikipedia is a description of a list that I maintained that helped me to earn the Microsoft Most Vocal Person award over a dozen years ago. I plugged in my modem and dialed up CompuServe daily to download foxforum messages (typically something like 800 per day: pretty…

10

Using the Databar feature with real data

I received an email with some sales figures in a table. I just pasted it into a new VFP program, added about 6 lines of code (below), then pasted the code from  Excel’s new gradient Data Bar feature is cool: you can do it too! After a couple minor adjustments, I had a graphical display…

3

SQL Select helps tune a car engine

In this post: Fox helps drag racer win Microsoft Start Something Amazing Award, I wrote about an application written for drag racers. Don has kindly posted a comment on that entry detailing some of the aspects of his system. It’s a more detailed look at a highly sophisticated application that has evolved, benefiting from years…

6

Recompress your digital pictures to save space

I have 23,000 digital pictures and movies taking many gigabytes of storage from the past decade or so. The more recent ones are larger, because higher resolution cameras were more readily available. I have a few copies of the entire collection on various computers for backup. I would like to save some space, perhaps to…

8