What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help disabling Windows Screensaver

Help disabling Windows Screensaver
Author: Message:
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. RE: RE: Help disabling Windows Screensaver
quote:
Originally posted by Mike2
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 :)


i got this error when running the program. sorry for the psot saying i couldnt see bold. when i posted it i saw the bold and then deleted the psot immediately sorry.

RileyM

.jpg File Attachment: vb screensaver disable error.jpg (44.52 KB)
This file has been downloaded 190 time(s).
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
12-30-2004 10:56 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help disabling Windows Screensaver - by Salem on 12-30-2004 at 07:03 PM
RE: Help disabling Windows Screensaver - by Mike on 12-30-2004 at 10:37 PM
RE: RE: Help disabling Windows Screensaver - by Salem on 12-30-2004 at 10:56 PM
RE: Help disabling Windows Screensaver - by Mike on 12-30-2004 at 10:57 PM
RE: RE: Help disabling Windows Screensaver - by Salem on 12-30-2004 at 11:01 PM
RE: Help disabling Windows Screensaver - by DJeX on 12-30-2004 at 11:07 PM
RE: RE: Help disabling Windows Screensaver - by Salem on 12-30-2004 at 11:17 PM
RE: Help disabling Windows Screensaver - by DJeX on 12-30-2004 at 11:24 PM
RE: RE: Help disabling Windows Screensaver - by Salem on 12-30-2004 at 11:53 PM
RE: RE: Help disabling Windows Screensaver - by Salem on 12-31-2004 at 10:16 AM
RE: Help disabling Windows Screensaver - by Mike on 12-31-2004 at 10:34 AM
RE: RE: Help disabling Windows Screensaver - by Salem on 12-31-2004 at 10:37 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On