unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Unit2;
type
TPene = class(TForm)
Label1: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
const
SPI_SCREENSAVERRUNNING = 97;
var
Pene: TPene;
OldValue: Longbool;
implementation
{on}
SystemParametersInfo(SPI_SCREENSAVERRUNNING, Word(True), @OldValue, 0);
{off}
SystemParametersInfo(SPI_SCREENSAVERRUNNING, Word(False), @OldValue, 0);
{$R *.dfm}
procedure TPene.Button1Click(Sender: TObject);
begin
Sapevo.ShowModal ;
close
end;
end.