9

The LA Fox Developer Newsletter
October 1999
FoxPro Q&A (Con’t from page 6)

This is the most bomb-proof I’ve come up with yet. I’ve fiddled with many different means of getting unique values, including various datetime-related values, and have settled on this. I always pass the fulipath to the table and the name of the field to increment.

FUNCTION GETPKEY(tcTable, tcField)
LOCAL Inkeyvalue, Inselect, Icalias, Ilopen

*_ Check for table & field. IF PCOUNT()=0
tctable = “mrsys” tcfleld = “bKey”
ENDIF
Save current work area
Inselect SELECT(O)

*__ Try to open the table
Icalias = justfname(tctable)
llopen = !USED(lcalias)
IF Ilopen
USE (tctable) AGAIN IN 0 ALIAS (Icalias)
ENDIF
SELECT (Icalias)

Lock and increment the value
IF RLOCKO
Inkeyvalue = &tcfield + I
REPLACE (tcfleld) WITH Inkeyvalue
UNLOCK
ELSE
lnkeyvalue = 0
ENDIF

IF liopen
USE
ENDIF

*__ Restore work area SELECT (lnselect)

RETURN Inkeyvalue

(Gary DeWitt, CIS ID: 73512,57)


Q. How do I implement a splash screen in my application?

A. The quick and dirty way is to use the -b command line switch to display a bitmap before the VFP screen is activated. However, this depends on the command line to work, and may get broken if the user messes with the shortcut. A more reliable method is to use a form for this purpose. In CONFIG.FPW set SCREENOFF, then in your main program call your own form (with TitleBar =0-Off, ShowWindow =2-As Top Level Form). Your splash form then can run a timer, or exit on user keypress, setting _SCREEN.Visible = .T. on its way out.
About October’s Meeting
From Mike Vincent
One of my favorite ActiveX vendors is dbiTech. They have established a specific arrangement for our FoxPro User Groups. They are offering a 20% discount on all DBI Technologies’ products (ToolBox Ocx V.4, Solutions::PIM, Solutions::Schedule and Solutions::Explorer), please make sure when they are ordering that you tell the dbiTech sales reps which user group you are associated with and include reference to my name/presentation. Otherwise, a discount will not apply.

Removing Obstacles (Con’t from page 5)

That’s not much of a payback, but one of the department’s longstanding goals has been to make this a continuous process, instead of a daily batch. Well, now I’m about an inch away from making that happen.

While I’m in the process of doing this, the company CEO gets up in front of everyone and says that the guys up top are planning deals. I’m likely to start getting my original data from other sources, as well. No doubt, it’ll be in strange new formats. Before, I’d have considered hari-kan. But now, I’m ready. All because I removed an obstacle, instead of going around it.


fEd. Note: Brad Druiy is the President of the Orange County FoxPro I)eve!opers Group. For more info on their group, point your browsers to http:iocfox.org/.)


It Can’t Get Any Easier.......
We’ve come up with an easy way to submit articles to the LA Fox Develper Newsletter.. one that has been overlooked for a long time.

You can submit your articles to Barry Lee at CIS# 72723,3422 on Compuserve, orbrlee@earthlink.net.

These articles can be on any FoxPro-related topic, whether it concerns a newtechnique you’ve discovered, a certain development technique you may favor over others, book reviews, etc. Editor reserves the right to edit or offer constructive comments concerning submitted articles and accepted articles shall be considered to be in the public domain.

The quality of this newsletter really depends on the members that support it, not just read it. And I think we’d all be surprised by the useful information that could be circulated around the membership.

So.
How ‘bout it?
Page

9