Upgrade from TDBG 6 to TDBG 7
The Visual Basic Upgrade Companion supports TrueDBGrid 7.0 and later versions, but not TrueDBGrid version 6.0. To migrate code containing version 6 controls, you must first upgrade TDBG 6.0 to TDBG 7.0
TrueDBGrid 6.0 defines some properties of the grid in the frx file, while TrueDBGrid 7.0 defines them in the frm file.
When a project in Visual Basic has a form, which contains a grid of type True DB Grid 6.0, some characteristics, such as properties of columns, positions, and more are defined in the form's frx file. Since the VBUC will only take the properties defined in the frm file, those properties embedded in the frx file are not migrated. So, to solve this issue, first migrate the version 6.0 controls to version 7.0 prior to migration with VBUC.
How to Upgrade to Version 7
In your VB6 development machine, install TrueDBGrid 7.0
You can get an evaluation from this link: http://download.componentone.com/pub/truedbgridpro7/eval
Copy to C:\Windows\System32 the next dll: tdbg8mu.dll
You can get it from this link: http://gccontent.blob.core.windows.net/gccontent/blogs/legacy/c1/2011/07/tdbg8mu1_utility.zip
Register that DLL using regsvr32
Modify the file C:\Windows\vbaddin.ini adding the next line: TDBG7MU.Connect=2
In Visual Basic 6, on the
menu Add-Ins/Add-in select the option "Load on startup" for "TrueDBGrid 7.0 Migration Utility"
Restart Visual Basic
The following button will appear on the upper menu:
Upgrade from TrueDBGrid 6.0 to TrueDBGrid 7.0 and from TrueDBGrid (OLEDB) 6.0 to TrueDBGrid (OLEDB) 7.0 (if applies)
Open each form and press CTRL + S to save all changes
Check that each form has changed, for example:
Sometimes the changes won't be applied to the forms, if that happens some workaround will be needed:
Add a grid (Version 7.0) on the form
Save the form
Delete the grid
Check changes were applied to the forms
Post-migration to .NET
After the migration to .NET, in C# some visual elements may need correcting. For example,
This is how a grid should look after the migration using version 7 of TrueDBGrid:
Because the designer file loaded incompletely, this is how the grid looks after the migration (column width incorrect):
The following steps can fix these kinds of problems:
Modify any property of the grid, like changing the position of an element or modifying the name of the grid. These changes should be done in the code of the designer file (designer.cs)
Save and close all files
Re-open the form: the grid should look correct
If it's necessary, don't forget to undo all changes previously applied to the designer file.
This workaround is needed because sometimes the designer isn't correctly rendered in the form, so when a new change is applied, it needs to load all the designer settings.
Upgrade from TDBG 6.0 to TDBG 7.0.pdf