FoxRockX - new magazine dedicated to FoxPro

FoxTalk magazine has been taken over by DFPUG on 1st March 2008 and renamed to FoxRockX. The new editor is Rainer Becker. The first issue is in print. The magazine will be published bimonthly online/hard copy with 24 content pages plus maybe advertising or sponsored articles.

More details at

Generate GUID

UDF below generates 128-bit GUID and returns it as a string in the format 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.



LOCAL lcGUID, lcStrucGUID, lnSize
lcStrucGUID = SPACE (16)
lcGUID = SPACE (78)
lnSize = LEN(lcGUID)/2

Creating directory preserving name case



Counting lines in an ASCII file

There is more than one way to count lines in an ASCII file.


* #1
lnRecCount = _TALLY
USE IN temp

* # 2. The line length cannot exceed 8192 bytes. Would return 1 for empty file
lnRecCount = 0
lnFH = FOPEN(lcAsciiFileName)
= FGET(lnFH, 8192)
lnRecCount = lnRecCount + 1

How to check if variable is Integer

FoxPro doesn't provide a direct way to check if variable is integer or how many digits it has after decimal point but it can be accomplished using PADL() function.

Copy PRG contents to Clipboard

In VFP 9.0 PRG contents will be copied to clipboard in RTF format as well, if there's no 'X' in the _Vfp.EditorOptions.

The code uses Editor functions from Foxtools.fll. See George Tasker's Extended Foxtools Help Download #9333 on UT for more info.



File operations with Progressbar

It's based on the late Ed Rauh's code around SHFileOperation Win API and requires his Heap allocation class. It supports wild cards and shows standard Windows progress bar.


* Copy file to different name
llSuccess = FileOpWithProgressbar("H:\TEMP\tord.dbf", "H:\TMP\TEST.dbf", "Copy")
* Copy with the same name
llSuccess = FileOpWithProgressbar("H:\TEMP\tord.dbf", "H:\TMP\", "Copy")
* Copy all dbf's

Microsoft Visual FoxPro 9.0 Sedna Add-Ons released

Visual FoxPro 9.0 Sedna is available for download on MSDN.
Sedna is a collection of libraries, samples and add-ons to Visual FoxPro 9.0 SP2.

It contains six components:

  • VistaDialogs4COM for VFP on Vista
  • Upsizing Wizard for SQL Server
  • Data Explorer updates
  • NET4COM examples to bridge VFP and .NET
  • MY IntelliSense extensions
  • DDEX for .NET access to VFP data

You know you are a nerd when...


You know you're a nerd when you qualify for a bulk discount on domain renewals.

[Spammers excluded]

Welcome to the new site

We have completed the transition to new software for the site. We hope you enjoy the changes.

The Old

The site used to be powered by a product called "Confluence", but we had to go to a different one for several reasons which I'll briefly mention.


Subscribe to The Bereznikers RSS