Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Screen Saver and UndelphiX

  1. #1

    Screen Saver and UndelphiX

    Doubt I`ll get an answer, but what the hell.

    Seems like you can't prevent the screensaver from kicking in once DelphiX is operating in fullscreen mode. The code is fine for windowed, but not full screen.

    Anyone defeated this?

  2. #2

    Screen Saver and UndelphiX

    Yes you can - have a search this topic has been answered before
    The views expressed on this programme are bloody good ones. - Fred Dagg

  3. #3

    Screen Saver and UndelphiX

    I don`t see it - can you help me?

  4. #4

    Screen Saver and UndelphiX

    http://www.pascalgamedevelopment.com...t=wmsyscommand

    have a look there

    This is what I use - but more info in the thread


    procedure WMSysCommand(var Msg : TWMSysCommand); message WM_SYSCOMMAND;

    [pascal]// SWITCH OFF THE SCREENSAVER AND THE MONITOR POWER SAVER IF THEY TRY TO CUT IN
    procedure TForm1.WMSysCommand(var Msg : TWMSysCommand);
    begin
    //catch the message and turn it off
    if (Msg.CmdType = SC_MONITORPOWER) or (Msg.CmdType = SC_SCREENSAVE) then
    begin
    Msg.Result := -1;
    end
    else
    inherited;///Otherwise do whatever is supposed to be done
    end;[/pascal]
    The views expressed on this programme are bloody good ones. - Fred Dagg

  5. #5

    Screen Saver and UndelphiX

    <center>
    <br />Federico &quot;FNX&quot; Nisoli
    <br />Lead Programmer - FNX Games
    <br />http://www.fnxgames.com
    <br /><img src="http://www.fnxgames.com/imgs/banners/fnxban.gif">
    <br /></center>

  6. #6

    Screen Saver and UndelphiX

    Quote Originally Posted by FNX
    I have tried this one already (and slight variations of)
    This solution doesn't work. The message is intercepted correctly, but the screensaver fires nonetheless.

    Maybe the secret lies in Czar's extra result setting - will try now..

  7. #7

    Screen Saver and UndelphiX

    Quote Originally Posted by czar
    http://www.pascalgamedevelopment.com/viewtopic.php?t=3963&highlight=wmsyscommand

    have a look there

    This is what I use - but more info in the thread


    procedure WMSysCommand(var Msg : TWMSysCommand); message WM_SYSCOMMAND;
    How is this proc suppose to be called? It won't plug onto the application.OnMessage....

  8. #8

    Screen Saver and UndelphiX

    Put this

    procedure WMSysCommand(var Msg : TWMSysCommand); message WM_SYSCOMMAND;

    in your form private - add the routine and bob's your uncle.

    Works for us - and we have this code used in hundreds of programs
    The views expressed on this programme are bloody good ones. - Fred Dagg

  9. #9

    Screen Saver and UndelphiX

    This is very strange. The condition is met and and the msg.result is set, but the screensaver still activates...

    Is there any other factor that I need to consider?

  10. #10

    Screen Saver and UndelphiX

    I thought the

    [pascal]Msg.Result := -1; [/pascal]

    should actually be

    [pascal]Msg.Result := 0;[/pascal]

    meaning handled, therefore it won't power off. Have you tried changing the result to zero?
    <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 1 of 3 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
  •