home *** CD-ROM | disk | FTP | other *** search
- unit unitMain;
-
- interface
-
- uses
- Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Tips;
-
- type
- TForm1 = class(TForm)
- Tips1: TTips;
- procedure FormActivate(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure FormDestroy(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- const
- fFileName: string = 'Tips.dat';
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormActivate(Sender: TObject);
- begin
- Tips1.Execute;
- end;
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- fFileName := ExtractFilePath(ParamStr(0)) + fFileName;
- if FileExists(fFileName) and (ofShowBtnEdit in Tips1.Options) then
- Tips1.LoadFromFile(fFileName);
- end;
-
- procedure TForm1.FormDestroy(Sender: TObject);
- begin
- if (ofShowBtnEdit in Tips1.Options) then Tips1.SaveToFile(fFileName);
- end;
-
-
- end.
-