LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Group policy screensaver - turn it off!

Hi,

I have a rather restricitve group policy set on my machine. I look
after a monte carlo simulation model, written in VBA, which annoying
breaks whenever the screensaver kicks in. They won't let me turn the
screensaver off. I have tried.

I have the following programming tools available:

1. VBA
2. Python compiler

and, er, that's it...

Does anyone know any vba hacks (or at a stretch a python hack) which
could stop my screensaver locking every 15 minutes, breaking my model?

I don't care how it does it - simulate a mouse movement, type a key,
turn the screensaver off... anything - it's becoming desperate!

I found the following in this newsgroup, but not sure it would work
with a group policy screensaver (Don Bardner, original author)...




Private Declare Function SystemParametersInfo Lib "user32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long,
_
lpvParam As Any, ByVal fuWinIni As Long) As Long


Sub SetScreenSaver(OnOff As Long)
'From Don Bradner
Dim templong As Long
Const SPI_SETSCREENSAVEACTIVE = 17
Const SPIF_UPDATEINIFILE = 1
Const SPIF_SENDWININICHANGE = 2
templong = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, OnOff,
ByVal
0&, _
SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub


Sub MySub()
SetScreenSaver 0
'your code here
SetScreenSaver 1
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow Trusted Locations on my network - Group Policy (GP) AKA Bones Excel Discussion (Misc queries) 3 April 21st 23 09:03 PM
How do I turn off [Group] mode? tothemax Excel Discussion (Misc queries) 4 April 2nd 23 08:13 PM
Macro Security for Excel 2007 (group policy) justmark Setting up and Configuration of Excel 3 July 29th 07 12:53 PM
How does one turn off gridlines only in a group of cells? cmhoover Excel Worksheet Functions 2 November 6th 06 11:37 PM
Macro run slow when turn on ScreenSaver Bill Li Excel Programming 0 October 30th 03 03:28 AM


All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"