home *** CD-ROM | disk | FTP | other *** search
/ PC World Plus! (NZ) 2001 June / HDC50.iso / Runimage / Delphi50 / Demos / Doc / Textedit / MDIFRAME.PAS < prev    next >
Pascal/Delphi Source File  |  1999-08-11  |  1KB  |  76 lines

  1. unit MDIFrame;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Menus;
  8.  
  9. type
  10.   TFrameForm = class(TForm)
  11.     MainMenu1: TMainMenu;
  12.     File1: TMenuItem;
  13.     New1: TMenuItem;
  14.     Open1: TMenuItem;
  15.     N1: TMenuItem;
  16.     Exit1: TMenuItem;
  17.     Window1: TMenuItem;
  18.     Tile1: TMenuItem;
  19.     Cascade1: TMenuItem;
  20.     Arrangeicons1: TMenuItem;
  21.     OpenFileDialog: TOpenDialog;
  22.     procedure Exit1Click(Sender: TObject);
  23.     procedure New1Click(Sender: TObject);
  24.     procedure Tile1Click(Sender: TObject);
  25.     procedure Cascade1Click(Sender: TObject);
  26.     procedure Arrangeicons1Click(Sender: TObject);
  27.     procedure Open1Click(Sender: TObject);
  28.   private
  29.     { Private declarations }
  30.   public
  31.     { Public declarations }
  32.   end;
  33.  
  34. var
  35.   FrameForm: TFrameForm;
  36.  
  37. implementation
  38.  
  39. uses MDIEdit;
  40.  
  41. {$R *.DFM}
  42.  
  43. procedure TFrameForm.Exit1Click(Sender: TObject);
  44. begin
  45.   Close;
  46. end;
  47.  
  48. procedure TFrameForm.New1Click(Sender: TObject);
  49. begin
  50.   TEditForm.Create(Self);
  51. end;
  52.  
  53. procedure TFrameForm.Tile1Click(Sender: TObject);
  54. begin
  55.   Tile;
  56. end;
  57.  
  58. procedure TFrameForm.Cascade1Click(Sender: TObject);
  59. begin
  60.   Cascade;
  61. end;
  62.  
  63. procedure TFrameForm.Arrangeicons1Click(Sender: TObject);
  64. begin
  65.   ArrangeIcons;
  66. end;
  67.  
  68. procedure TFrameForm.Open1Click(Sender: TObject);
  69. begin
  70.   if OpenFileDialog.Execute then
  71.   with TEditForm.Create(Self) do
  72.     Open(OpenFileDialog.FileName);
  73. end;
  74.  
  75. end.
  76.