home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programming Unleashed / Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso / misc / objects / frm2comp / main.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-21  |  834 b   |  49 lines

  1. unit Main;
  2.  
  3. { Program copyright (c) 1995 by Charles Calvert }
  4. { Project Name: FRM2COMP }
  5.  
  6. interface
  7.  
  8. uses
  9.   SysUtils, WinTypes, WinProcs,
  10.   Messages, Classes, Graphics,
  11.   Controls, Forms, Dialogs,
  12.   StdCtrls, Buttons, ExtCtrls;
  13.  
  14. type
  15.   TForm1 = class(TForm)
  16.     BitBtn1: TBitBtn;
  17.     Panel1: TPanel;
  18.     procedure BitBtn1Click(Sender: TObject);
  19.   private
  20.     { Private declarations }
  21.   public
  22.     { Public declarations }
  23.   end;
  24.  
  25. var
  26.   Form1: TForm1;
  27.  
  28. implementation
  29.  
  30. uses
  31.   NewComp, UtilBox;
  32.  
  33. {$R *.DFM}
  34.  
  35. procedure TForm1.BitBtn1Click(Sender: TObject);
  36. var
  37.   Main2: TCompForm;
  38. begin
  39.   Main2 := TCompForm.Create(Self);
  40.   Main2.Parent := Panel1;
  41.   Main2.BorderWidth := 6;
  42.   Main2.Color := clBlue;
  43.   Center(TWinControl(Main2), Panel1);
  44.   Main2.Show;
  45.   BitBtn1.Enabled := False;
  46. end;
  47.  
  48. end.
  49.