|
-
Feb 23rd, 2004, 08:35 AM
#1
Thread Starter
Fanatic Member
How to supress the screensaver? ::resolved::
Hi-di-ho programmeréro's!
I'm making this movie player, but the screensaver just keeps poppin up, very annoying...
So my question is: how can I supress (or dis- and enable) the screensaver?
Thanx and cheers,
Alexander.
Last edited by arsmakman; Feb 23rd, 2004 at 09:06 AM.
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
-
Feb 23rd, 2004, 08:43 AM
#2
Fanatic Member
Why don,t you set the screensaver to none in the properties window of windows.
Hope im on the right lines for you
Cheers
-
Feb 23rd, 2004, 08:52 AM
#3
Thread Starter
Fanatic Member
Originally posted by laserman
Why don,t you set the screensaver to none in the properties window of windows.
Hope im on the right lines for you
Cheers
Sorry, you're not on the right lines for me. I really need my program to disable the screensaver. Other people are going to use this program, I can't expect them all to turn off their screensavers...
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
-
Feb 23rd, 2004, 08:58 AM
#4
Fanatic Member
Yes Sorry though it was more than that.
I think there are a few little programs floating around.
Have you done a search?
Cheers
-
Feb 23rd, 2004, 08:59 AM
#5
Thread Starter
Fanatic Member
I've searched on the forum, couldn't find anything. But I'll check the web.
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
-
Feb 23rd, 2004, 09:06 AM
#6
Thread Starter
Fanatic Member
Found something:
VB Code:
'Author: Waty Thierry
'Origin: <a href=\"http://www.geocities.com/ResearchTriangle/6311/\" target=\"_blank\">[url]http://www.geocities.com/ResearchTriangle/6311/[/url]</a>
'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
Private Sub Form_Load()
ToggleScreenSaverActive False
End Sub
Private Sub Form_Unload(Cancel As Integer)
ToggleScreenSaverActive True
End Sub
It works.
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
-
Feb 23rd, 2004, 09:12 AM
#7
Frenzied Member
No offense, but I hate it when a program changes my OS settings. What if the user opens your software and then walks away for several hours? I'd want my screensaver to be up when I come back.
-
Feb 23rd, 2004, 09:17 AM
#8
Thread Starter
Fanatic Member
Originally posted by ober5861
No offense, but I hate it when a program changes my OS settings. What if the user opens your software and then walks away for several hours? I'd want my screensaver to be up when I come back.
I'll change the code so the screensaver lock will only be on while playing.
It doesn't appear to be that hard: "ToggleScreenSaverActive True"
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
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
|