   Help for Ver

Properties

Registration Information

Order Form

Getting Custom Controls Written

Description

Ver is a custom control that makes access simple.  No Windows API calls required.

File Name

VER1.VBX

Object Type

Version

Compatibility

VB 2.0 and above

Remarks

Ver should be placed on all forms where its functionality is required (including MDI forms and children).  Ver can be placed directly on an MDI form.

Distribution Note     When you develop and distribute an application that uses Ver, you should install the file VER1.VBX into the users Windows SYSTEM directory.  Ver has version information built into it.  So, during installation, you should ensure that you are not overwriting a newer version of Ver.


Properties

All of the properties that apply to this control are in this table.  Properties that have special meaning for this control or that only apply to this control are marked with an asterisk (*).

*Action	*ForceInstall	*ProductVersion

Align	Height	*RecommendedDir

*ApplicationDir	*InternalName	*SourceDir

*CompanyName	*IsShared	*SourceFile

*CurrentDir	*Language	*Status

*DeleteOld	Left	*SystemDirectory

*DestinationDir	*LegalCopyright	Tag

*DestinationFile	*LegalTrademarks	*TemporaryFile

Enabled	Name	Top

*FileDescription	*OriginalFilename	Width

*Filename	Parent	*WindowsDirectory

FileVersion	*ProductName

Filename is the default value for the control.


CompanyName Property

See Also	Example

Description

Holds the company name from the file specified by Filename.

Usage

[form.][control.]CompanyName

Remarks

This property holds the name of the company that produced the file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

FileDescription

Filename

FileVersion

InternalName

Language

LegalCopyright

LegalTrademarks

OriginalFilename

ProductName

ProductVersion


FileDescription Property

See Also	Example

Description

Holds the description from the file specified by Filename.

Usage

[form.][control.]FileDescription

Remarks

This property holds the description, intended for end-users, of a file file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

Filename

FileVersion

InternalName

Language

LegalCopyright

LegalTrademarks

OriginalFilename

ProductName

ProductVersion


FileVersion Property

See Also	Example

Description

Holds the version number of the file specified by Filename.

Usage

[form.][control.]FileVersion

Remarks

This property holds the version number of the file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

InternalName

Language

LegalCopyright

LegalTrademarks

OriginalFilename

ProductName

ProductVersion


InternalName Property

See Also	Example

Description

Holds the internal name from the file specified by Filename.

Usage

[form.][control.]CompanyName

Remarks

This property holds the internal name of the file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

FileVersion

Language

LegalCopyright

LegalTrademarks

OriginalFilename

ProductName

ProductVersion


Language Property

See Also	Example

Description

Holds the name of the language used in the file specified by Filename.

Usage

[form.][control.]Language

Remarks

This property holds the name of the used in the file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

FileVersion

InternalName

LegalCopyright

LegalTrademarks

OriginalFilename

ProductName

ProductVersion


LegalCopyright Property

See Also	Example

Description

Holds the copyright information from the file specified by Filename.

Usage

[form.][control.]LegalCopyright

Remarks

This property holds the copyright notices that apply to the file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

FileVersion

InternalName

Language

LegalTrademarks

OriginalFilename

ProductName

ProductVersion


LegalTrademarks Property

See Also	Example

Description

Holds the trademarks from the file specified by Filename.

Usage

[form.][control.]LegalTrademarks

Remarks

This property holds the trademarks and registered trademarks that apply to the file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

FileVersion

InternalName

Language

LegalCopyright

OriginalFilename

ProductName

ProductVersion


OroginalFilename Property
OriginalFilename Property

See Also	Example

Description

Holds the original name of the file specified by Filename.

Usage

[form.][control.]OriginalFilename

Remarks

This property holds the original name (without path) of the file specified by the Filename property.  This information allows you to determine if the file was renamed by a user.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

FileVersion

InternalName

Language

LegalCopyright

LegalTrademarks

ProductName

ProductVersion


ProductName Property

See Also	Example

Description

Holds the name of the product for the file specified by Filename.

Usage

[form.][control.]ProductName

Remarks

This property holds the name of the product that the file specified by the Filename property was distributed with.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

FileVersion

InternalName

Language

LegalCopyright

LegalTrademarks

OriginalFilename

ProductVersion


ProductVersion Property

See Also	Example

Description

Holds the version of the product with which the file specified by Filename was distributed.

Usage

[form.][control.]ProductVersion

Remarks

This property holds the version of the product that included file specified by the Filename property.

This property is read-only.  This string is always present.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

Filename

FileVersion

InternalName

Language

LegalCopyright

LegalTrademarks

OriginalFilename

ProductName


Version Information Properties
Version Information Example

In this example, the program will read the version information from a file.  The file is hard-coded to be C:\WINDOWS\PROGMAN.EXE.  To try this example, paste the code into the Declarations section of a form that contains a command button, a multi-line text box (set the MultiLine property to True at design-time), and a Ver control.  Press F5.  Then, press the command button.

Sub Command1_Click ()

    Version1.Filename = C:\WINDOWS\PROGMAN.EXE

    Text1.Text = "CompanyName: " & Version1.CompanyName

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "FileDescription: "

    Text1.Text = Text1.Text & Version1.FileDescription

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "FileVersion: "

    Text1.Text = Text1.Text & Version1.FileVersion

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "InternalName: "

    Text1.Text = Text1.Text & Version1.InternalName

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "Language: "

    Text1.Text = Text1.Text & Version1.Language

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "LegalCopyright: "

    Text1.Text = Text1.Text & Version1.LegalCopyright

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "LegalTrademarks: "

    Text1.Text = Text1.Text & Version1.LegalTrademarks

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "OriginalFilename: "

    Text1.Text = Text1.Text & Version1.OriginalFilename

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "ProductName: "

    Text1.Text = Text1.Text & Version1.ProductName

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "ProductVersion: "

    Text1.Text = Text1.Text & Version1.ProductVersion

End Sub


SystemDirectory Property

See Also	Example

Description

Tells the full path of the System directory.

Usage

[form.][control.]SystemDirectory

Remarks

This property holds the full path of the System directory.

This property is read-only.

Data Type

String


See Also

Properties:

WindowsDirectory


WindowsDirectory Property

See Also	Example

Description

Tells the full path of the Windows directory.

Usage

[form.][control.]WindowsDirectory

Remarks

This property holds the full path of the Windows directory.

This property is read-only.

Data Type

String


See Also

Properties:

SystemDirectory


Windows Directories Properties
Windows Directories Example

In this example, the program will get the Windows and System directories. To try this example, paste the code into the Declarations section of a form that contains a command button, a multi-line text box (set the MultiLine property to True at design-time), and a Ver control.  Press F5.  Then, press the command button.

Sub Command1_Click ()

    Text1.Text = "WindowsDirectory: "

    Text1.Text = Text1.Text & Version1.WindowsDirectory

    Text1.Text = Text1.Text & Chr$(13) & Chr$(10)

    Text1.Text = Text1.Text & "SystemDirectory: "

    Text1.Text = Text1.Text & Version1.SystemDirectory

End Sub


Filename Property

See Also	Example

Description

Specifies the file to examine.

Usage

[form.][control.]Filename[ = stringexpression ]

Remarks

This property specifies the full filename of the file whose version information you wish to examine.  When this property is filled with a valid filename, Ver checks that file for version information.  If its present, Ver fills in the following properties: CompanyName, FileDescription, FileVersion, InternalName, Language, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, and ProductVersion.

Data Type

String


See Also

Properties:

CompanyName

FileDescription

FileVersion

InternalName

Language

LegalCopyright

LegalTrademarks

OriginalFilename

ProductName

ProductVersion


ApplicationDir Property

See Also

Description

Specifies the directory where the application resides

Usage

[form.][control.]ApplicationDir[ = stringexpression ]

Remarks

This property tells Ver where the application that youre installing or examining resides.  It is used in the find file function (Action = 1) to let VER.DLL know where to search.

Data Type

String


See Also

Properties:

Action

ApplicationDir

CurrentDir

IsShared

RecommendedDir

SourceFile

Status


CurrentDir Property

See Also

Description

Specifies the directory where a particular file currently resides.

Usage

[form.][control.]CurrentDir[ = stringexpression ]

Remarks

This property specifies the directory where a file currently resides (the file specified by SourceFile).

This property is filled in by the Find File action (Action = 1).  The Install File action (Action = 2) uses this property to rename or delete the old version of the file.

Data Type

String


See Also

Properties:

Action

ApplicationDir

DeleteOld

DestinationDir

DestinationFile

ForceInstall

IsShared

RecommendedDir

SourceDir

SourceFile

Status

TemporaryFile


DestinationDir Property

See Also

Description

Specifies the directory to install in.

Usage

[form.][control.]DestinationDir[ = stringexpression ]

Remarks

This property tells the Install File action (Action = 2) where to install a specific file (specifed by SourceFile and renamed to DestinationFile).

Data Type

String


See Also

Properties:

Action

CurrentDir

DeleteOld

DestinationFile

ForceInstall

SourceDir

SourceFile

Status

TemporaryFile


DestinationFile Property

See Also

Description

Specifies the final name of a file to install.

Usage

[form.][control.]DestinationFile[ = stringexpression ]

Remarks

This property tells the Install File action (Action = 2) what to rename a file to when installing it.  The file to install is specified by the SourceDir and SourceFile properties.  And, the directory to install it in is specified by the DestinationDir property.

Data Type

String


See Also

Properties:

Action

CurrentDir

DeleteOld

DestinationDir

ForceInstall

SourceDir

SourceFile

Status

TemporaryFile


TemporaryFile Property

See Also

Description

Holds the name of a temporary file created.

Usage

[form.][control.]TemporaryFile

Remarks

This property holds the name of a temporary file created during the Install File action (Action = 2).

This property is read-only and only available at run-time.

Data Type

String


See Also

Properties:

Action

CurrentDir

DeleteOld

DestinationDir

DestinationFile

ForceInstall

SourceDir

SourceFile

Status


RecommendedDir Property

See Also

Description

Specifies where a file is recommended to be installed.

Usage

[form.][control.]RecommendedDir[ = stringexpression ]

Remarks

This property specifies the path of where VER.DLL thinks a file (specified by SourceFile) should be installed.  This property is filled in by the Find File action (Action = 1).

If the IsShared property is set to False, the Find File action will recommend installing the file in the applications directory.  If the system is running a shared copy of Windows, the current Windows directory will be recommended (see WindowsDirectory).  Otherwise, the System directory will be recommended (see SystemDirectory).

This property is read-only and only available at run-time.

Data Type

String


See Also

Properties:

Action

ApplicationDir

CurrentDir

IsShared

SourceFile

Status


SourceDir Property

See Also

Description

Specifies the directory to install from.

Usage

[form.][control.]SourceDir[ = stringexpression ]

Remarks

This property tells the Install File action (Action = 2) where to find a specific file (specified by SourceFile).

Data Type

String


See Also

Properties:

Action

CurrentDir

DeleteOld

DestinationDir

DestinationFile

ForceInstall

SourceFile

Status

TemporaryFile


SourceFile Property

See Also

Description

Specifies the to install.

Usage

[form.][control.]SourceFile[ = stringexpression ]

Remarks

This property specifies the name of a file to install or search for.  The Find File action (Action = 1) uses this as the filename to search for.  The Install File action (Action = 2) uses this as the name of the file to install from (found in SourceDir, copied and renamed to DestinationDir and DestinationFile).

Data Type

String


See Also

Properties:

Action

ApplicationDir

CurrentDir

DeleteOld

DestinationDir

DestinationFile

ForceInstall

IsShared

RecommendedDir

SourceDir

Status

TemporaryFile


DeleteOld Property

See Also

Description

Determines whether or not file installation deletes older versions.

Usage

[form.][control.]DeleteOld[ = boolean ]

Remarks

This property determines if older versions of a file (specified by SourceFile and located in CurrentDir) are deleted when the file is installed (Action = 2).

Data Type

Integer (boolean)


See Also

Properties:

Action

CurrentDir

DestinationDir

DestinationFile

ForceInstall

SourceDir

SourceFile

Status

TemporaryFile


ForceInstall Property

See Also

Description

Determines whether or not to force file installation.

Usage

[form.][control.]ForceInstall[ = boolean ]

Remarks

This property determines if Ver will force the installation of a file (regardless of version numbers).  This is only used with the Install File action (Action = 2).

Data Type

Integer (boolean)


See Also

Properties:

Action

CurrentDir

DeleteOld

DestinationDir

DestinationFile

SourceDir

SourceFile

Status

TemporaryFile


IsShared Property

See Also

Description

Determines whether or not this file should be shared between applications.

Usage

[form.][control.]IsShared[ = boolean ]

Remarks

This property tells Ver whether or not this file (specified by SourceFile) will be shared with other applications (i.e., a VBX or DLL).  It is used by the Find File action (Action = 1).

If this property is set to False, the Find File action will recommend (see RecommendedDir) installing the file in the applications directory.  If the system is running a shared copy of Windows, the current Windows directory will be recommended (see WindowsDirectory).  Otherwise, the System directory will be recommended (see SystemDirectory).

Data Type

Integer (boolean)


See Also

Properties:

Action

ApplicationDir

CurrentDir

IsShared

RecommendedDir

SourceFile

Status


Action Property

See Also

Description

Finds or installs a file.

Usage

[form.][control.]Action[ = integer ]

Remarks

This property tells Ver whether or not this file (specified by SourceFile) will be shared with other applications (i.e., a VBX or DLL).  It is used by the Find File action (Action = 1).

Value	Description

1	Find File  This action finds a file (specified by SourceFile) that might be installed and recommends a directory (see RecommendedDir) in which to install a newer version of the file.  This action searches the Windows directory (WindowsDirectory), the System directory (SystemDirectory), the ApplicationDir, and the current directory.

If the file is found, the CurrentDir property is filled in with the locatlion.  Otherwise, CurrentDir is cleared.

Prior to using this action, you should fill in the IsShared, SourceFile, and ApplicationDir properties.  After you execute this action, the CurrentDir, RecommendedDir, and Status properties will be set.

2	Install File  This action installs a file.  It takes a file (specified by SourceDir and SourceFile) and installs it, decompressing if needed, in the location specified by DestinationDir and DestinationFile.  CurrentDir should point to the directory where the previous version of this file, if any, was found by the Find File action (see above).

The ForceInstall property can be set to force the files installation regardless of version numbers.  And, the DeleteOld property can be used to make Ver delete the old version of this file.

After this action, the Status property is set accordingly.

This property is only available at run-time.

Data Type

Integer


See Also

Properties:

ApplicationDir

CurrentDir

DeleteOld

DestinationDir

DestinationFile

ForceInstall

IsShared

RecommendedDir

SourceDir

SourceFile

Status

TemporaryFile


Status Property

See Also

Description

Holds the results of an action.

Usage

[form.][control.]Status

Remarks

This property is set after a Find File (Action = 1) or Install File (Action = 2) action is performed.  The constants listed below are defined in the VER.TXT file found in SAMPLE.ZIP.

For the Find File (Action = 1) action, this property can be one or more of the following values (ORed together):

Value	Description

VFF_CURNDEST	This indicates that the currently installed versino of the file is not in the recommended destintation (i.e., CurrentDir <> DestintationDir).

VFF_FILEINUSE	This means that the currently installed version of the file is being used by Windows.  The file cannot be overwritten or deleted.

For the Install File (Action = 2) action, this property can be one or more of the following values (ORed together):

Value	Description

VIF_TEMPFILE	The temporary copy of the file is in the destination directory.

VIF_MISMATCH	Ths new and currently installed files differ in one or more attributes (version-wise).  This can be overridden by setting the ForceInstallproperty to True and performing the action again.

VIF_SRCOLD	This means the file you are attempting to install is older than the currently installed file. This can be overridden by setting the ForceInstallproperty to True and performing the action again.

VIF_DIFFLANG	This means that the language (see Language) version properties of the currently installed file and the file you are attempting to install are different. This can be overridden by setting the ForceInstallproperty to True and performing the action again.

VIF_DIFFCODEPG	This means that the new file needs a code page that cant be displayed by Windows. This can be overridden by setting the ForceInstallproperty to True and performing the action again.

VIF_WRITEPROT	This means that the current file is write-protected.  The read-only bit in the current file should be reset prior to continuing with the installation.

VIF_FILEINUSE	The current file is being used by Windows.  It cant be deleted.

VIF_OUTOFSPACE	The temporary file could not be created due to lack of disk space.

VIF_ACCESSVIOLATION	Some operation (create, delete, or rename) failed due to an access violation.

VIF_SHARINGVIOLATION	Some operation (create, delete, or rename) failed due to an sharing violation.

VIF_CANNOTCREATE	The temporary file could not be created.  Check other flags for more specifics.

VIF_CANNOTDELETE	The currently installed file could not be deleted.

VIF_CANNOTRENAME	The installation process cant rename the temporary file.  And, it has already deleted the currently installed file.

VIF_OUTOFMEMORY	Could not proceed due to lack of memory.  This usually means a buffer could not be allocated or expanded during the decompression process.

VIF_CANNOTREADSRC	The installation process could not read the source file.  This could be many things: the path was incorrect (see SourceDir), the file doesnt exist, or that its a corrupted compressed file.

VIF_CANNOTREADDST	The destination file cannot be read.

This property is read-only and is only available at run-time.

Data Type

Integer


See Also

Properties:

Action


Registration Information

Credits

Ver was written by James Shields.  Inquiries can be sent to 71231,2066 on CompuServe, or mabry@halcyon.com on Internet.  Our mailing address is:

Mabry Software, Inc.

Post Office Box 31926

Seattle, WA  98103-1926

Registration

You can register this program by sending $20 ($25 for international orders) and your address.  You can register Ver and its C source code by sending $50 ($55 for international orders).  With your order, you will receive a copy of our manual documenting all of our controls.

For your convenience, an order form has been provided that you can print out directly from this help file.

E-mail Discount

You may take a $5 discount for e-mail delivery of this package (CompuServe or Internet).  If you choose this option, please note: a printed manual is not included.  Be sure to include your full mailing address with your order.  Sometimes (on the Internet) the package cannot be e-mailed.  So, we are forced to send it through the normal mails.

CompuServe members may also take the $5 e-mail discount by registering this package in the software registration forum (GO SWREG).  Vers SWREG ID number is 2529.  The source code version's ID number is 2530.

Credit Card Orders

We accept VISA and Mastercard.  If you e-mail your order to us, please be sure to include your card number, expiration date, complete mailing address, and your phone number (in case we have any questions about your order).

© Copyright 1994-1995 by Mabry Software, Inc.


Order Form
 Ver Order Form

Use the Print Topic.. command from the File menu to print this order form.

Mail this	Mabry Software, Inc.

form to:	Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272

BBS: WinDev BBS 206-634-0783

CompuServe: 71231,2066

Internet: mabry@halcyon.com

Where did you get this copy of Ver?

____________________________________________________________________

Ship to:	____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

Phone:	_________________________________________________________________

Fax:	_________________________________________________________________

E-Mail:	_________________________________________________________________

MC/VISA:	_________________________________________ exp. ___________________

Disk Size:	(circle one)	 3½	5¼

qty ordered	____	REGISTRATION

$20 each, postpaid (check or money order in hard currency). Outside of North America add $5.00 shipping.

qty ordered	____	SOURCE CODE AND REGISTRATION

$50 each, postpaid (check or money order in hard currency). Outside of North America add $5.00 shipping.


Getting Custom Controls Written

If you or your organization would like to have custom controls written, you can contact me at the following:

James Shields

Mabry Software, Inc.

Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272

BBS: WinDev BBS 206-634-0783

CompuServe: 71231,2066

Internet: mabry@halcyon.com

You can also contact Zane Thomas.  He can be reached at:

Zane Thomas

Post Office Box 300

Indianola, WA  98342

CompuServe: 72060,3327