문제

I have a Delphi app that places the computer into screensave using

hWnd := GetDesktopWindow ;
SendMessage (hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0) ;

This works fine under XP but I find it doesn't work under (embedded) Windows 7.

Any ideas?

도움이 되었습니까?

해결책

It works for me (Windows 7 Home Premium, 64-bit). Have you tried to send the message to another window, such as Handle? (Also, are you sure that you have a screensaver installed?)

다른 팁

The SC_SCREENSAVE message tells the target window to execute the screen saver application specified in the [boot] section of the System.ini file. As the o/s is Embedded windows, which is a cut-down version of windows, quiet likely the system.ini file is configured for no screen-saver. Check your system.ini file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top