VB Migration Partner

KNOWLEDGE BASE - Forms and controls

Previous | Index | Next 

[HOWTO] Migrate binary properties of nested user controls

In some cases, VB Migration Partner isn’t able to correctly migrate binary properties (e.g. the Picture property) of a UserControl nested in another UserControl. You can overcome this limitation in one of the following three ways.

First, write a control extender, as explained in this this article.

Second, extract the binary property from the .CTX file, by using this tool or by temporarily inserting a call to the SavePicture method in the Form_Load event handler. Next, you use the VBMP Project Dumper VB6 add-in to generate an XML file and modify the obtained file so that it points to the saved bitmap, as in this example:

    <projectitem name="formname">       
        <control name="controlname">         
             <property type="Object" name="Picture">           
                 <filename name="c:\savepict.bmp">           

(Notice that the items to be modified are inside the projectItem node that represents the form.)

Finally, you can save the modified XML file and migrate the UserControl.

Third, use the AxWrapperGen tool to create a wrapper for the UserControl and then convert the wrapper into pure .NET code that doesn’t depend on the any ActiveX control.

Previous | Index | Next 

Follow Francesco Balena on VB6 migration’s group on


Read Microsoft Corp’s official case study of a VB6 conversion using VB Migration Partner.

Code Architects and its partners offers remote and onsite migration services.

More details

Subscribe to our free newsletter for useful VB6 migration tips and techniques.


To learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report about your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET.

Get free advice

A fully-working, time-limited Trial Edition of VB Migration Partner allows you to test it against your actual code

Get the Trial

The price of VB Migration Partner depends on the size of the VB6 application, the type of license, and other factors

Request a quote

Migrating a VB6 application in 10 easy steps

Comparing VB Migration Partner with Upgrade Wizard

Migration tools: Feature Comparison Table

All whitepapers