screensaver

How to determine that a screensaver is running?

我与影子孤独终老i 提交于 2019-12-01 06:22:01
One solution that one could suggest is to periodically look for a special 'Screen-saver' desktop, and if it's present then count it as a running screensaver. But apparently this is not the case for all screensavers as with some the mentioned desktop is always present. Are there more reliable solutions for this? I think the key is to identify the screensaver by its window class ("WindowsScreenSaverClass"). I found this page How do I start, detect and stop screen savers? that has some code examples and explanations. See the WINAPI function SystemParametersInfo() with the SPI

How to determine that a screensaver is running?

[亡魂溺海] 提交于 2019-12-01 04:43:19
问题 One solution that one could suggest is to periodically look for a special 'Screen-saver' desktop, and if it's present then count it as a running screensaver. But apparently this is not the case for all screensavers as with some the mentioned desktop is always present. Are there more reliable solutions for this? 回答1: I think the key is to identify the screensaver by its window class ("WindowsScreenSaverClass"). I found this page How do I start, detect and stop screen savers? that has some code

How can I write a screen saver for Windows in C++?

天涯浪子 提交于 2019-11-30 14:15:38
问题 I want to write a screen saver for Windows using the Windows API. How can I start to write it? 回答1: Basically a screensaver is just a normal application that accepts a few command line options, provided by windows, to determine if it should start fullscreen or in a preview window. So, write a normal exe-application that takes the following command line arguments (from http://msdn.microsoft.com/en-us/library/ms686421(v=vs.85).aspx): /s – Start the screensaver in full-screen mode. /c – Show the

How to turn screensaver on (windows 7) by a code (in cmd)? [closed]

*爱你&永不变心* 提交于 2019-11-30 04:14:12
How to turn screensaver on (windows 7) by a code (in cmd)? Grant Wagner Does the following meet your requirements? start logon.scr /s As long as the .scr is on the PATH the above command should work. EDIT: I don't know if Windows 7 comes with logon.scr , make sure you're testing it with a .scr that is actually installed in Windows 7. Note that I got the idea of just invoking the .scr with /s from Screensaver Sample Command Line Options : When Windows runs your screensaver, it launches it with one of three command line options: /s – Start the screensaver in full-screen mode. /c – Show the

mac screensaver start event

故事扮演 提交于 2019-11-29 21:55:02
Is there an event fired when screensaver starts? Like for keychain locking: OSStatus keychain_locked(SecKeychainEvent keychainEvent, SecKeychainCallbackInfo *info, void *context){...} Finally found it — the solution is to use NSDistributedNotificationCenter and observe folowing events com.apple.screensaver.didstart com.apple.screensaver.willstop com.apple.screensaver.didstop com.apple.screenIsLocked com.apple.screenIsUnlocked Like [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(screensaverStarted:) name:@"com.apple.screensaver.didstart" object:nil]; While

Turn Java App into Windows Screensaver

人盡茶涼 提交于 2019-11-29 21:53:59
I wrote a program that solves mazes with depth-first search. I was wondering how to turn this Java program into a Screensaver application? Is there a way that Windows 7 starts my app when the screensaver would normally be activated? A Windows screen saver is just program that accepts certain command line arguments . So in order to have your program be runnable as a screen saver you must code it to accept those arguments. Next you will probably want your screen saver to run in full screen mode. This is very simple to do in Java as the example below shows: public final class ScreenSaver { public

Take a screenshot of open website in python script

孤街浪徒 提交于 2019-11-29 15:42:13
I need to write a python script which opens a website and when the website is completly opened it takes a screenshot of the opened website. I wrote sth like this: import webbrowser import wx wx.App() link = "http://stackoverflow.com/questions" webbrowser.get('firefox %s').open_new_tab(link) screen = wx.ScreenDC() size = screen.GetSize() bmp = wx.EmptyBitmap(size[0], size[1]) mem = wx.MemoryDC(bmp) mem.Blit(0, 0, size[0], size[1], screen, 0, 0) del mem bmp.SaveFile('screenshot.png', wx.BITMAP_TYPE_PNG) It only opens a new tab in firefox but it doesnt take a screenshot of it :( I want the

Detecting that the user is away from the PC with .NET

梦想与她 提交于 2019-11-29 12:04:13
I have a desktop application in which I would like to know two things: Is the user currently on the PC (more specifically, is he giving any input to the PC), so I can change his state to "away" if needed; and Is the screensaver running right now, so I can perform more CPU intensive work during that time. I'm using C#/.NET. How would you suggest to tackle these two tasks? NOTE : WIN32 invocation will be just as good, as well as any unmanaged code solution. Phill http://dataerror.blogspot.com/2005/02/detect-windows-idle-time.html ^ Detect Windows Idle Time. :) The enabler for this feature is the

mac screensaver start event

不想你离开。 提交于 2019-11-28 17:55:49
问题 Is there an event fired when screensaver starts? Like for keychain locking: OSStatus keychain_locked(SecKeychainEvent keychainEvent, SecKeychainCallbackInfo *info, void *context){...} 回答1: Finally found it — the solution is to use NSDistributedNotificationCenter and observe folowing events com.apple.screensaver.didstart com.apple.screensaver.willstop com.apple.screensaver.didstop com.apple.screenIsLocked com.apple.screenIsUnlocked Like [[NSDistributedNotificationCenter defaultCenter]

Turn Java App into Windows Screensaver

a 夏天 提交于 2019-11-28 17:45:01
问题 I wrote a program that solves mazes with depth-first search. I was wondering how to turn this Java program into a Screensaver application? Is there a way that Windows 7 starts my app when the screensaver would normally be activated? 回答1: A Windows screen saver is just program that accepts certain command line arguments. So in order to have your program be runnable as a screen saver you must code it to accept those arguments. Next you will probably want your screen saver to run in full screen