用api来实现
const spi_screensaverrunning=97
private declare function systemparametersinfo lib "user32" alias "Systemparametersinfoa"(byval uaction as long,byval uparam as long,lpvparam as any,byval fuwinini as long) as long
dim pold as boolean
'禁止
call systemparametersinfo(spi_screensaverruning,true,pold,0)
'开启
call systemparametersinfo(spi_screensaverruning,flase,pold,0)
这样就可以实现了。
const spi_screensaverrunning=97
private declare function systemparametersinfo lib "user32" alias "Systemparametersinfoa"(byval uaction as long,byval uparam as long,lpvparam as any,byval fuwinini as long) as long
dim pold as boolean
'禁止
call systemparametersinfo(spi_screensaverruning,true,pold,0)
'开启
call systemparametersinfo(spi_screensaverruning,flase,pold,0)
这样就可以实现了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货