[Gambas-user] frm2form 0.01

Rob sourceforge-raindog2 at ...94...
Mon Jul 21 05:57:03 CEST 2003


Here is version 0.01 of frm2form.pl, which converts rudimentary VB forms into 
very, very rudimentary Gambas forms.  It is a Perl program, and so you'll 
need Perl installed (but it should work on either Linux or Windows.)

Here is what it does presently:

- Copies all controls on the VB form onto the Gambas form.
- Strips "VB." off of the beginning of VB class names.
- Renames "CommandButton" controls to "Button".
- Converts size and placement from twips (VB) to pixels (Gambas).
- Special-cases the Timer control (in fact, that's the only control that's 
completely supported presently.... since it only has 3 properties.)
- Makes a valid Gambas form, which (if you're only using controls that have 
direct Gambas equivalents) will pop up looking a little funny after you set 
it as your startup class and press F5.

Here is what it does NOT do (yet):

- Preserve (or generate) any code at all.
- Preserve any properties other than X, Y, Width, Height and the timer's 
Delay/Interval.  No fonts, colors, captions, disabled/invisible, or any of 
that other stuff yet.
- Pull image data out of .frx files, e.g. for icons or Picture/Image controls.  
I'm not sure how far I'll get with that part of it, either, unless someone 
happens to have specs for the VB5/VB6 FRX format.
- Map control names, except as noted above.
- Create a .class file to go with your .form file.  In fact, it dumps the form 
definition onto the console.  You'll need to redirect it into a formname.form 
file and create a formname.class file (blank is okay) or else Gambas will 
crash when you double click a control in edit mode.
- Handle control arrays.  Since I didn't have a project handy that created a 
control array, I have no idea what it would look like in the .frm file and no 
idea what my filter (or Gambas) will do with it.


Even though it scarcely even merits a 0.01 release, I wanted to get it out 
there so people know I'm working on it, and to encourage you guys to email me 
some .frm files (preferably with a screenshot of what they should look like) 
and .frx files that go with them, so I can work on it some more.  (So far, 
this is based on two little unfinished VB projects I had sitting on my hard 
disk from the last time I had Windows installed 3 years ago.)  Please DO NOT 
email me anything sensitive, anything to which you do not own the copyright, 
and in short, anything you wouldn't want the entire world to see.  I don't 
intend on redistributing your code, but I don't want the added responsibility 
of keeping top secret stuff secret.

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frm2form001.pl
Type: text/x-perl
Size: 2697 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20030720/c98d7828/attachment.pl>


More information about the User mailing list