Board index » delphi » API to run screen saver?

API to run screen saver?

Quote
"Belmin" <NO-SPAM-serpen...@yahoo.com> wrote...
> Hey guys,
>     I want to kno if any of you guys know the API call (NT/2000) to run
the
> screen saver as if the person was idle for x minutes? Cause I tried just
> running the .scr file but then the password protection is not on.. anyone?

Please refrain from cross-posting irrelevant information or questions
to too many newsgroups without justification.  You Windows API query
is off-topic in comp.lang.c++.

Thank you.

Victor
--
Please remove capital A's from my address when replying by mail

 

Re:API to run screen saver?


Hey guys,
    I want to kno if any of you guys know the API call (NT/2000) to run the
screen saver as if the person was idle for x minutes? Cause I tried just
running the .scr file but then the password protection is not on.. anyone?

--
Belmin Fernandez
http://home.nyc.rr.com/belmin/

Re:API to run screen saver?


In article <8l2m5.12074$F3.305...@typhoon.nyc.rr.com>,
  "Belmin" <NO-SPAM-serpen...@yahoo.com> wrote:

Quote
> Hey guys,
>     I want to kno if any of you guys know the API call (NT/2000) to
run the
> screen saver as if the person was idle for x minutes? Cause I tried
just
> running the .scr file but then the password protection is not on..
anyone?

> --
> Belmin Fernandez
> http://home.nyc.rr.com/belmin/

Hi,

You need to

SendMessage(hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0);

where hWnd is the handle to any Window (eg a dialog box).  The password
protection *is* enabled, but on NT4 there seems to be a short delay
beforehand in which the screensaver can be aborted without a password.
I think this is to make it easier to abort the screensaver when it cuts
in when you don't want it.  So make the SendMessage call, wait about 2
minutes, and then it should be locked.

Steve Clark

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:API to run screen saver?


Could someone post simple screensaver-example-project for D5
or give an address (http) for one, please
B.R. jukka

Other Threads