Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Nov : change screensaver -> windows98

www.cryer.info
Managed Newsgroup Archive

change screensaver -> windows98

Subject:change screensaver -> windows98
Posted by:"Gerhard Illigan" (illigan_ger@nospam.com)
Date:5 Nov 2005 13:42:05 -0700

hi,

i've used the following code to change the screensaver. it works
great on WinXP but nothing will change while running on Win98!

with TRegistry.Create() do begin
  try
    RootKey := HKEY_CURRENT_USER;
    if OpenKey('Control Panel\Desktop', False) then begin
      WriteString('SCRNSAVE.EXE', ExtractShortPathName('something'));
      SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, nil, SPIF_SENDWININICHANGE);
    end;
  finally
    Free();
  end;
end;

can you tell me how to make this code compatible with all windows
versions?

thanks,
Gerhard Illigan

Glossary

File Types

Replies:

www.cryer.info
Managed Newsgroup Archive