[DUG] Creating a DFM from a PAS file

Jeremy Coulter vss at vss.co.nz
Tue Jan 23 16:02:54 NZDT 2007


Hi all.
I have a PAS file that is part of a Pascal scripting language that I use.
 
What I want to do is, is take part of that code and generate a DFM file. any
one seen anything to do this?
 
i.e. take 
 
constructor TfrmMyForm.Create(AOwner: TComponent);
begin
  inherited;
  Shape1 := TShape.Create(Self);
  Shape1.Name := 'Shape1';
  Shape1.Parent := Self;
  with Shape1 do
  begin
    Left := 0;
    Top := 60;
    Width := 622;
    Height := 25;
    Align := alTop;
    Brush.Color := clInfoBk;
  end;
end;
 
and turn it into a DFM i.e.:-
 
object TForm
  Left = 20
  Top = 10
  Width = 625
  Height = 257
  BorderIcons = [biSystemMenu]
  Caption = 'A Form'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  FormStyle = fsNormal
  OldCreateOrder = False
  Visible = True
  PixelsPerInch = 96
  TextHeight = 13
  object Shape1: TShape
    Left = 0
    Top = 60
    Width = 617
    Height = 25
    Align = alTop
    Brush.Color = clInfoBk
  end

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.5/645 - Release Date: 22/01/2007
16:10
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20070123/2f312df1/attachment.html


More information about the Delphi mailing list