Application.MajorVersion

From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aApplication.MajorVersion

Supported for all project types and targets.

The major version of the Application, corresponding to the version information. The range is from 0 to 255. This can only be set in the IDE, but you can read the value in your code.

Notes

Typically version numbers are written as 1.2.3.4 (MajorVersion.MinorVersion.BugVersion.NonReleaseVersion).

Sample Code

Puts all the individual versions together to create the full version:

Var fullVersion As String
fullVersion = Str(MajorVersion) + "." + Str(MinorVersion) + "." _
+ Str(BugVersion) + "." + Str(NonReleaseVersion)