VBFormDesignToXML.exe

Given the declarative design part of a VB6 .frm file (see the VBFormDesignFilter utility), outputs an XML representation of it so that it can be further processed using XSL tranformations or other XML tranformation/querying tools

Download: VBFormDesignToXML_20040818.zip

The output XML document is based on the "VBFormDesign.dtd" (Document Type Definition), included in the same folder

Syntax: VBFormDesignToXML [codeFile [inputFile [outputFile [encoding]]]]
Alternative ("DOS" filter) syntax: VBFormDesignToXML [codeFile] [ <inputFile [ >outputFile ]]

The default value for the encoding parameter is ISO-8859-1 (English)

The "codeFile" parameter is supposed to be the original .frm file or the output of VBFormCodeFilter on the original .frm file. It's optional and if you provide it you get a list of all event names and the respective event handler subroutine names for each component in an EVENTS xml node under the COMPONENT node (see the "VBFormDesign.DTD" file)

Requirements: if you want to rebuild using the source code (Delphi), you need the source code for the following units:

Notes: in the .frm file, you might see something like:

 Begin VB.Label lblB06a
  Caption = $"Formb06.frx":2C53
  Height = 375
  ...

This means the "Caption" of the "lblB06a" label is not contained in the .frm file in this case, but is at the offset (hex) 2C53 in the Formb06.frx file (in the same folder as the .frm file). If you take a look with a hex editor in this file, at this offset is a 4-byte number that's the length of the data that follows (ASCII text in this case)

The $ at the start means that the external data are of string type, if this is missing, it's binary data, for example some image. I currently ignore such external data if it's binary, but they could be encoded appropriately and inserted in the XML - e.g. can use &x10;x20;x30; for the 3 bytes 102030 (hex)