home *** CD-ROM | disk | FTP | other *** search
- unit Main;
- {
- Demo-Program for TLMDScreensavers.
-
- There are only a few lines of code implemented, but it
- is a funtionable ScreenSaver... (we had not time to implement
- flying toasters or something similar <g>
-
- The screensaver will change the backgroundcolor of the saverform every
- second. We include a outcommended Paint-Procedure to show the technique displaying
- the restored Desktop. Take a look at this if you need something like that.
-
- Besides there is a demonstration of the OnCheckPassword and OnSetupDlg. We implemented
- a small password-dialog for demonstration purposes.
-
- Note:
- If you want to test your Setup-Dialog, you have to set as Parameter '/c'. Windows will
- try to start your screensaver with this parameter to request an existing Setup-Dialog ('/s' for
- starting the screensaver). You have to set this parameter in the Parameters-Option in Delphi's
- Start-Menu. If there is no use of a setup-dialog, forget this note.
-
- To implement this demo-saver into your windows environment, rename the exe-File
- to a scr-File and copy it to your windows directory.
-
- This program is freeware. Use it and enjoy!
- If you made any improvements it would be nice to send them to me.
-
- ⌐ 1995 by LMD Innovative
-
- ------------------------------------------------------------------
- History:
- 0.01.00 (08.09.95): First Version
-
- Author: RM}
-
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Menus, Lmdscrsv, pwdl, pwchange;
-
- type
- TMainForm = class(TForm)
- saver: TLMDScreenSaver;
- Timer1: TTimer;
- procedure FormPaint(Sender: TObject);
- procedure saverCheckPassWord(Sender: TObject; var CanClose: Boolean);
- procedure saverSetupDlg(Sender: TObject);
- procedure Timer1Timer(Sender: TObject);
- end;
-
- var
- MainForm: TMainForm;
-
- implementation
-
- {$R *.DFM}
-
- procedure TMainForm.FormPaint(Sender: TObject);
- begin
-
- {set the savebackground property true and use this lines -
- the desktop will be shown... - certainly you should manipulate the
- desktop for a sophisticated saver! <g>}
- {if saver.Bitmap<>nil then
- Canvas.copyrect(rect(0,0,Width,Height), saver.Bitmap.Canvas, rect(0,0,Width,Height));}
-
- end;
-
- procedure TMainForm.saverCheckPassWord(Sender: TObject;
- var CanClose: Boolean);
- var PWDlg:TPWDlg;
-
- begin
-
- {look the use of the Canclose-variable!}
- PWDlg:=TPWDLG.Create(application);
- if PWDLG.ShowModal<>mrOK then CanClose:=False;
- PWDlg.Free;
-
- end;
-
- procedure TMainForm.saverSetupDlg(Sender: TObject);
- var PWCH:TPWCH;
-
- begin
-
- PWCH:=TPWCH.Create(application);
- PWCH.ShowModal;
- PWCH.Free;
-
- end;
-
- procedure TMainForm.Timer1Timer(Sender: TObject);
- begin
-
- color:=TColor(Random(65000));
- end;
-
- initialization
- Randomize;
-
- end.
-