Here we are. Just tried this and the screensaver kicked in as normal...
The form is "default" as in File => New Project
[pascal]
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
procedure WMSysCommand(var Msg : TWMSysCommand); message WM_SYSCOMMAND;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
procedure TForm1.WMSysCommand(var Msg : TWMSysCommand);
begin
if (Msg.CmdType = SC_MONITORPOWER) or (Msg.CmdType = SC_SCREENSAVE) then
begin
Msg.Result:=0;
end
else
inherited;
end;
{$R *.DFM}
end.
[/pascal]
Bookmarks