->如何關閉ScreenSave功能,改變Timeout時間
此外希望只有本次使用Windows時改變(下次開機時還原原狀),則最後參數改為 SPIF_SENDWININICHANGE(沒有SPIF_UPDATEINIFILE)
ConstSPI_SETSCREENSAVEACTIVE=17
ConstSPI_SETSCREENSAVETIMEOUT=15
ConstSPIF_SENDWININICHANGE=&H2
ConstSPIF_UPDATEINIFILE=&H1
PrivateDeclareFunctionSystemParametersInfoLib"user32"Alias_
"SystemParametersInfoA"(ByValuActionAsLong,ByValuParamAsLong,_
ByVallpvParamAsLong,ByValfuWinIniAsLong)AsLong
PrivateSubSetScreenSaveTimeout(ByValBySecondAsLong)
CallSystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,BySecond,0,_
SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub
PrivateSubEnableScreenSave()
CallSystemParametersInfo(SPI_SETSCREENSAVEACTIVE,1,0,_
SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub
PrivateSubDisableScreenSave()
CallSystemParametersInfo(SPI_SETSCREENSAVEACTIVE,0,0,_
SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub->->