|
-
Oct 16th, 2000, 10:31 AM
#1
Thread Starter
Junior Member
Any ideas how I disable a screen saver from working.
-
Oct 16th, 2000, 11:18 AM
#2
New Member
i haven't tried this but, would moving the mouse cursor every few minutes, using an API call or two work ?
it's just a thought.
-
Oct 16th, 2000, 02:04 PM
#3
Code:
'Author: Waty Thierry
'Origin: http://www.geocities.com/ResearchTriangle/6311/
'Purpose: Activate/Deactivate the Screen Saver
'Version: VB4+
Option Explicit
Private Const SPI_SETSCREENSAVEACTIVE = 17
Private Const SPIF_UPDATEINIFILE = &H1
Private Const SPIF_SENDWININICHANGE = &H2
Private Declare Function SystemParametersInfo Lib "user32" _
Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal _
uParam As Long, ByVal lpvParam As Long, ByVal fuWinIni As _
Long) As Long
Public Function ToggleScreenSaverActive(Active As Boolean) _
As Boolean
'To Activate Screen Saver, set active to true
'to deactivate, set active to false
Dim lActiveFlag As Long
Dim retval As Long
lActiveFlag = IIf(Active, 1, 0)
retval = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, _
lActiveFlag, 0, 0)
ToggleScreenSaverActive = retval > 0
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|