【 tulaoshi.com - 编程语言 】
->如何关闭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->->