Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB project Exe Version 1

Status
Not open for further replies.

SBerthold

Programmer
Sep 20, 2002
1,014
DE
What is the logic behind setting and using the Major, Minor and build numbers in a VB EXE project?

When I set the major to 7, the minor to 5 and the build to 101 then, when checking the version number in the properties window for a EXE (in explorer, right mouse click, properties, version), I get: 7.05 instead of 7.5.101 And the rest isn't being shown.
When I use P&D and check the file version in Setup.lst, it shows: 7.5.0.1 instead of 7.5.101.

I would like both versions to show the same, as 7.5.101

When I check the version numbers of other programs, like the DAO 3.51.1608, it shows the same (correct) version number in Properties and well as the Setup.lst.
Sometimes a version number looks like this: 3.51.1608.1001.
With four dots. But in VB Project Properties I cannot use the dots - only whole numbers.

Can some please explain to me the proper use of the version number?
 
"Build" means App.Revision.

Can anyone help?
 
You will probably will not find much help there for VB6 as it only covers basic info.
I have never seen any MS explanation for this concerning the VB property settings.

This is the way I see it (by examining the values under different circumstances) with VB:

The App.Major formats to a minimum of one digit, but the minor will format to a minimum of two digits, even if there is only one digit. And the Revision will always format to 4 digits.

So, if you have the following:

Major = 7
Minor = 2
Revision = 54

it will format to: 7.02.0054

And,

Major = 7
Minor = 12
Revision = 554

will format to: 7.12.0554

And so on.

You can use this format code to format the version correctly:

sVers = Format$(App.Major,"0") & "." & Format$(App.Minor,"00") & "." & Format$(App.Revision,"0000")

Where the first Format is not needed.
I do not use 7.5, but instead I use 7.50.

In VB6 the property for the Build number is missing. Therefore you will see you will see:

7.02.0.0054

In VB Net this is somewhat corrected.
The Build then defaults to the day of the year, and the Revision to the seconds of the day since midnight.
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top