home *** CD-ROM | disk | FTP | other *** search
- unit fViewDFM;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- fMDIChild, cShape, Buttons, StdCtrls, ExtCtrls, cdcDelphiTools;
-
- type
- TFormViewDFM = class(TChild)
- Panel1: TPanel;
- Memo: TMemo;
- Label3: TLabel;
- SBSelect: TSpeedButton;
- SBExplorer: TSpeedButton;
- OpenDialog: TOpenDialog;
- TranslateDFM: TTranslateDFM;
- procedure SBSelectClick(Sender: TObject);
- procedure SBExplorerClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- implementation
-
- Uses FileCtrl;
-
- {$R *.DFM}
-
- //-----------------------------------------------------------------------------}
- procedure TFormViewDFM.SBExplorerClick(Sender: TObject);
- begin
- inherited;
- beep
- end;
-
- //-----------------------------------------------------------------------------}
- procedure TFormViewDFM.SBSelectClick(Sender: TObject);
- Var s,ss:String;
- begin
- inherited;
- with OpenDialog do begin
- DefaultExt:='dfm';
- Filter:='Delphi Res File (*.dfm)|*.dfm';
- Title:='Delphi Res File :';
- InitialDir:=ExtractFilePath('c:\');
- FileName:=ExtractFileName('Test.dfm');
- If not Execute then Exit;
- s:=FileName;
- Self.Caption:=ExtractFileName(s);
- end;
-
- if TTranslateDFM.TranslateDFM(s,ss) then
- Self.Memo.Text:=ss
- end;
-
- end.
-