Welcome to the DevPower Web Site
  home   |  support   |  shop   |  downloads   |  about devpower 

DevPower Web Version Check ActiveX Control Version 4.0.0 (01-Nov-01)

Copyright (c) 1998 - 2017 Steve Robbins All Rights Reserved.

Documentation

Properties

  • AutoLaunchBrowser Boolean
    Sets whether the control should automatically launch the users web browser when a new version is found. The browser will display the URL specified in the version file.
  • CurrentVersion String
    Sets the version of your application or control to check against.
  • URL String
    Sets the URL to download version information from - see the "File Content" section below for example files.
  • XMLFile Boolean
    Sets whether the text to be downloaded should be parsed as XML or treated as a plain text file as used by previous versions.
  • XPathVersion String
    Sets the XPath query to use to extract the version from XML files - default is /webvercheck/@version
  • XPathDownloadURL String
    Sets the XPath query to use to extract the download url from XML files - default is /webvercheck/@downloadURL
  • XPathAbstract String
    Sets the XPath query to use to extract the abstract from XML files - default is /webvercheck/@abstract
  • XPathCustomData String
    Sets the XPath query to use to extract the custom text from XML files - default is /webvercheck

Methods

  • AboutBox( )
    Displays copyright and version information for the control.
  • Check( )
    Performs the version check - the control attempts to get the file specified by the URL property and parse it for version information as outlined below.

Events

  • UpdateAvailable ( String NewVersion, String DownloadURL, String Abstract, String CustomData )
    Triggered by the Check( ) method when a new version has been found in the. specified WebVrChk control file.
    The NewVersion parameter is the version in the control file.
    The DownloadURL parameter is the optional URL to direct the user to, again specified in the control file. This will be automatically displayed if the AutoLaunchBrowser property is True.
    The Abstract parameter is the abstract from the control file.
    The CustomData parameter is the custom data from the control file.
  • UpdateUnavailable ()
    Triggered by the Check( ) method when the version found in the version control file is the same as the CurrentVersion.
  • ErrorInDownload ( Integer Error )
    Triggered when an error occurs whilst trying to obtain the control file specified by the URL property.
    Error parameter determines the cause of the error:
    -1 means 'File not Found' or Could not connect to Web Server.
    -3 means that MSXML2 or MSXML could not be created for parsing an XML file.
    -4 means that the XML parser could not parse the text in the downloaded file as valid XML.
    Checking this event means that checking can fail gracefully if the user is not connected to the internet.

File Contents - XML File

The XML file format can follow any schema you desire as the control uses the XPath queries set by the XPath properties to extract text from the file. The default schema can be seen here.

  • Version - default XPath query: /webvercheck/@version
    the string to compare with the CurrentVersion property
  • (Optional) DownloadURL - default XPath query: /webvercheck/@downloadURL
    A URL that will be returned in the UpdateAvailable Event and displayed to the user in their web browser if the AutoLaunchBrowser property is set to True and a new version is found.
  • (Optional) Abstract - default XPath query: /webvercheck/@abstract
    Typically a message to display to users about the new version (however, it can be used however you like) that is returned in the UpdateAvailable Event
  • (Optional) CustomData - default XPath query: /webvercheck
    Custom information for your use - this field is the only one that can spread across multiple lines in the version file that is returned in the UpdateAvailable Event

File Contents - Traditional Plain Text File

The traditional text file is not flexible and must follow a strict format defined here. An example file can be seen here.

  • Version=version
    the string to compare with the CurrentVersion property
  • (Optional) DownloadURL=Any URL
    A URL that will be returned in the UpdateAvailable Event and displayed to the user in their web browser if the AutoLaunchBrowser property is set to True and a new version is found.
  • (Optional) Abstract=description of changes
    Typically a message to display to users about the new version (however, it can be used however you like) that is returned in the UpdateAvailable Event
  • (Optional) CustomData=any text data
    Custom information for your use - this field is the only one that can spread across multiple lines in the version file that is returned in the UpdateAvailable Event