Try this
Put this on the top of the form code
code:
'<<< CONSTANTS >>>
Private Const SPI_SETSCREENSAVEACTIVE As Long = 17
Private Const SPIF_UPDATEINIFILE = &H1
Private Const SPIF_SENDWININICHANGE = &H2
'<<< DECLARES >>>
Private Declare Function SystemParametersInfo _
Lib "user32" _
Alias "SystemParametersInfoA" _
(ByVal uAction As Long, ByVal uParam As Long, _
ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
To enable/disable the screensaver:
code:
Dim lRet As Long
lRet = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, ByVal 0, SPIF_UPDATEINIFILE)
Change the bolded part to 0 if you want to disable it and to 1 if you want to enable it