frm2form is a perl filter that you can use to convert VB forms to Gambas forms. It ignores all VB code and all controls and properties that it doesn't know about, but the underlying structure of the form, fonts and colors should make it over intact. It also ignores .frx files because there's no documentation on the .frx format.

I have restarted development of this script after not looking at it in a year, because Gambas has changed a lot. It works well for most of the forms I need to recreate for my clients.

To use it, put it in a directory with your VB .frm file and type perl frm2form.pl mygambasform.form

Then type touch mygambasform.class

Copy mygambasform.* into an existing gambas project and then open the project. The form should be available to you for editing and coding.

New in version 0.07: Menus are correctly converted now, and controls with no caption in VB get a blank Text property in Gambas instead of the name of the control.

New in version 0.06: I now check each control against a list of known controls and convert untranslatable ones (like custom controls especially) to PictureBoxes. Some additional attributes get converted now too, and I fixed a bug that reduced control arrays to a single control.

-- RobKudla - 29 Sep 2004

In the future I intend to optionally create the associated class file automatically, as well as the Gambas project file itself, and add code to the project to implement things like control arrays (currently they just translate into a whole mess of controls) and DirListBox and FileListBox controls. Ultimately I'll try to optionally convert some of the code over, though that never seems to work very well. Maybe I'll only be able to do it for Option Explicit projects.

And of course, once the future regexp functionality is ready I'll try to port this tool to Gambas so it will be easier to integrate in the IDE like "File/Import".


Attachment: Action: Size: Date: Who: Comment:
frm2form.pl action 7188 18 Nov 2004 - 21:46 RobKudla version 0.07