AutoIncrement

This property determines whether the version number of a project is automatically incremented each time you build an EXE or DLL from the project. It corresponds to the Auto Increment check box in the Version dialog of the Project Manager (accessed through the Build dialog).

Usage

lIncrementIt = prjProject.AutoIncrement
prjProject.AutoIncrement = lIncrementIt
Since VFP 5, we've had the ability to brand executables with a three-part version number (in the form 9999.9999.9999). Not only that, but we could set it up so that each time we build the project, the version number increases. This property gives us programmatic access to that decision.There's only one minor glitch here. Setting AutoIncrement to .T. affects only the last section of the version number (the rightmost group). If you run out of room in that group (that is, it reaches 9999), your version numbers stop incrementing. Frankly, we hope we don't do 10,000 builds to EXE of any project we're working on any time soon, but Microsoft may. We've noticed several of their EXEs and DLLs with revision numbers in the seven and eight thousand range. It's intriguing to guess what they'll do for these files in a few years.

Example

Application.ActiveProject.AutoIncrement = .T.

See Also

Build, Build DLL, Build EXE, Project, VersionNumber


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .