home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1992
/
17
/
savenow
/
savenow.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-07-14
|
673b
|
23 lines
{$R-,S-,L-,D-}
PROGRAM SaveNow;
{$R SAVENOW}
USES WinTypes, WinProcs, Strings;
VAR SSName : ARRAY[0..150] OF Char;
BEGIN
IF GetProfileInt('Windows', 'ScreenSaveActive', 0) = 0 THEN
MessageBox(0, 'Use Control Panel to select a screen saver',
'ERROR', mb_Ok + mb_IconStop)
ELSE
BEGIN
GetPrivateProfileString('boot', 'SCRNSAVE.EXE', '',
SSName, 150, 'SYSTEM.INI');
IF SSName[0]=#0 THEN
MessageBox(0, 'Use Control Panel to select a screen saver',
'ERROR', mb_Ok + mb_IconStop)
ELSE
BEGIN
StrCat(SSName, ' /S');
WinExec(SSName, sw_Normal);
END;
END;
END.