[Gambas-user] frm2form 0.01
Nelson Ferraz
nferraz at ...184...
Mon Jul 21 16:28:47 CEST 2003
Ok... I found the error: Gambas dies if the ".form" file doesn't have a
corresponding ".class" file. D'oh! :)
The latest version includes a function to convert twips to pixels
(borrowed from Rob's script):
# Twips properties that must be converted to pixels
my @twips = qw (Top Left Width Height);
# ...
# Convert twips
foreach my $t (@twips) {
if ($input =~ /$t\s+\=\s+(\d+)/) {
my $old_val = $1;
my $new_val = int($old_val * 10 / 144);
$input =~ s/$old_val/$new_val/g;
}
}
I've successfully converted a simple VB form downloaded from the web!
[]s
Nelson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vb2gb.pl
Type: text/x-perl
Size: 1566 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20030721/79100097/attachment.pl>
More information about the User
mailing list