Board index » delphi » Screen Saver - Is it Running under Windows NT ???
Moose
![]() Delphi Developer |
Fri, 27 Dec 2002 03:00:00 GMT
Screen Saver - Is it Running under Windows NT ???I have been playing around with bits of code I have found on the Net - none I need to find out how to tell if the screen saver is running under Windows I think I know how to do this for 95 / 98 - see below. And, I am not sure about Windows 3.x. Just hopping someone can set me straight .... :) Here is my code so far : Function WIN_API_INC___Is_Screen_Saver_Running : Boolean; Scr_Result := SystemParametersInfo (SPI_SCREENSAVERRUNNING, 0, SystemParametersInfo (SPI_SCREENSAVERRUNNING, Is_Running, @Temp_Val, if (Is_Running = 0) then Else WindowHandle := GetForegroundWindow(); if (WindowHandle <> NULL) then w1 := GetWindowLong (WindowHandle, GWL_STYLE); GetWindowRect (WindowHandle, RC); Hope somebobody can help. Mike |