Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

VB6 applications use FRX files to store binary data associated with various control properties.  This includes things as simple as formatted text for text boxes, to images and icons, to proprietary information associated with ActiveX controls.  

Likewise, .NET applications use Resx files to store binary data associated with the application.  Resx files are XML files that can contain application metadata and base-64-encoded binary information (i.e., bitmaps, icons). Resx files may also contain legacy ActiveX control property settings and binary information needed for interoped controls (i.e., OCXState).

gmBasic handles the most common types of FRX data (i.e., formatted text and images for VB intrinsic controls) automatically.  

ImageList FRX to Resx 

One commonly used type of FRX data that is not handled automatically is the graphics associated with ImageList controls.  If your application uses graphics from an ImagesList, you may convert these images to Resx files  as follows

To run generate Resx files for ImageLists

  1. Select the migration units for which you want to create to Resx files.  This is typically this all VBPs that have forms with FRX data..
  2. Select [Tools/Author Resx Files] from the menu 
    This will create a resx files for each migration unit in the migration project and store them in the resx folder in your workspace.  The Resx files will contain the ImageList data in base-64-encoded format.   
  3. To direct gmBasic to use the Resx data from your resx files in the resx folder, you must edit the translation script file and add the Resx attribute of the Compile command:
Tip

The standard way to do this is to use the %ResxFolder% script script variable.  See the FileExplorer sample for an example.

Code Block
languagehtml/xml
themeEclipse
<Compile Project="%SrcPath%" Resx="%ResxFolder%" />

 

Tip

By default, the Generate Resx operation is used only for migrating MSComCtl.ImageList to WinForms ImageList.  The Resx Generator reads the binary images from frx/ctx files and writes base64 encoded resx XML data for WinForms images in resx files in the resx folder.  If Compile@resx is set, the translator then reads the resx files in the resx folder and copies data from the resx file into the translation bundle.

If the Authoring Resx files is typically a one-time preparation step: if the ImageLists used by the source VB6 do not change content or location, then you do will not need to redo AuthorResx files.

From FileExplorer sample:

<Compile Project="%SrcPath%" Resx="%ResxFolder%">

See the FileExplorer sample for an examplehave to rerun Author Resx files.

Custom FRX to RESX

Some ActiveX controls store complex binary data in FRX files. These files can be converted to code and/or Resx data.  Custom FRX data conversion requires an understanding of the structure of the FRX data.   If you know the FRX data structure, you may extend gmBasic to extract and reauthor FRX data as needed.  

These conversions can be done with specialized GM tools and the gmBasic APIs (gmSL and gmNI). If you must convert proprietary FRX data as part of your migration project, please contact Great Migrations for assistance.

See Also

Compile command Resx attribute

Select OmitResxData option




Table of Contents