Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: Screen Saver and UndelphiX

  1. #11

    Screen Saver and UndelphiX

    Screen saver still activates with Msg.Result:=0

  2. #12

    Screen Saver and UndelphiX

    Quote Originally Posted by nzo2
    Screen saver still activates with Msg.Result:=0
    What are you using to test if this code works? Using ScreenSaver Preview will not generate a SC_SCREENSAVE message, but if you set your screen saver timeout to 1 minute and wait, it will and you will see that the screensaver does not kick in. I know because I just tried it.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  3. #13

    Screen Saver and UndelphiX

    It isn`t using a screensaver preview. I let the screensaver kick in. The SC_SCREENSAVE message is generated and is intercepted. However, the screensaver still runs.

  4. #14

    Screen Saver and UndelphiX

    Really?? On my Windows XP machine using Delphi 7 it works as advertised.

    Can you post the full form code you are using?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  5. #15

    Screen Saver and UndelphiX

    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]

  6. #16

    Screen Saver and UndelphiX

    That is, line for line, exactly the code I used and it works fine for me.

    Is the Screen Saver a default Windows one? I know I'm grasping at straws here, but it's the only thing I can think of.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  7. #17

    Screen Saver and UndelphiX

    yes, just the XP logo. Only thing different is it is password enabled.

  8. #18

    Screen Saver and UndelphiX

    Where do I set a screen saver password? I can't seem to find the option.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  9. #19

    Screen Saver and UndelphiX

    where you set the timeout, checkbox for onresume, password protected

  10. #20

    Screen Saver and UndelphiX

    Hmm I don't have a password option, though I have seen it on other systems. If you remove your password protection, does it still start the screen saver?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •