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.
Printable View
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.
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...Quote:
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
Yes Sorry though it was more than that.
I think there are a few little programs floating around.
Have you done a search?
Cheers
I've searched on the forum, couldn't find anything. But I'll check the web. :thumb:
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.
:D :thumb: :D
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.Quote:
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.
It doesn't appear to be that hard: "ToggleScreenSaverActive True" :)