screensaver

How to show a preview of screen saver inside WPF window

巧了我就是萌 提交于 2019-12-22 10:39:42
问题 I want to be able to show a preview of a screen saver inside WPF window. (using a container or control or ...) I know that Windows itself passes "/p" argument to the screen saver to get a preview. But how can I show that preview inside my WPF application? Should I get a handle of it and change its parent to my container o control? How? 回答1: You need to use Windows.Forms interop, because screen savers expect windows handles (HWND) and in WPF, only top-level windows have them. MainWindow.xaml

How to disable the screen saver/display sleep on Mac

倾然丶 夕夏残阳落幕 提交于 2019-12-21 11:30:17
问题 Is there a way to disable the screen saver and the display sleep with cocoa? 回答1: The use of UpdateSystemActivity(OverallAct) has been deprecated in OSX 10.8. The recommended approach is now to block it with the following call: IOPMAssertionCreateWithName(kIOPMAssertionTypePreventUserIdleDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &assertionID); See this Apple Q&A for further details. 回答2: i've just solved it and forgot to post it as an answer. Calling UpdateSystemActivity

How does screen savers work on Mac OS X and Linux?

拟墨画扇 提交于 2019-12-21 06:21:37
问题 In Windows a screen saver is just an executable with a .scr extension dumped in the system32, and it is controlled with three switches (/p, /c and /s, I think). How does screen savers work on Mac OS X and Linux? Do they work similarly in Mac OS X and Linux (Gnome, KDE, Ubuntu, or wherever the difference is) or is it completely different? Also, can they be developed in C#/Mono? 回答1: The screensaver system in OSX is that a screensaver (typically, but not necessarily) is an Objective-C library,

How do I control the screensaver name shown in the drop down list?

拜拜、爱过 提交于 2019-12-20 02:01:18
问题 I have a working screensaver and would like to figure out how I can control the name Windows displays in the screensaver drop down list. Currently it all seems to be based on the filename but I know that can't be the case. Here's what I've tried and the results: Filename: CC.Votd.scr ScreenSaver Name: Cc Filename: CC Votd.scr ScreenSaver Name: Cc Votd I'd like to have the file be named CC.Votd.scr and have the screensaver name display as CC.Votd (capitalization is important to me so even CC

How to install screensaver programmatically?

不打扰是莪最后的温柔 提交于 2019-12-19 09:27:43
问题 How to install (register) screensaver programmatically? 回答1: AFAIk there are two ways: Permanent registration by copying it to a location that windows searches, such as System32 . But don't hardcode "C:\Windows\System32". You need to query the system to find out where the system directory is. Calling the Install action on the .scr file, which results in temporary activation. But the screensaver will disappear once another has been selected and the dialog restarted. But this is from Win95

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

狂风中的少年 提交于 2019-12-18 11:12:41
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How to turn screensaver on (windows 7) by a code (in cmd)? 回答1: 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

Take a screenshot of open website in python script

偶尔善良 提交于 2019-12-18 09:18:05
问题 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

How to determine if a screensaver is running in Java?

半世苍凉 提交于 2019-12-17 14:43:07
问题 My Application periodicly shows information on the screen. But if the screenshot is active, the application should wait until the user returns. Is there any way to determine if the screensaver is running? I don't need a clean solution, u just needs to work on windows xp. Similar question, but other technology: How to determine that a screensaver is running? 回答1: Try using the JNA library to invoke the SystemParametersInfo system call. The following example uses code from the win32 examples

Strange lifecycle behavior in my Screen Saver App

我是研究僧i 提交于 2019-12-14 03:43:38
问题 I just developed a screen saver app and I found a strange behavior in its lifecycle. My work flow is like this: start my RegisterService , where I call registerReceiver method to register a BroadcastReceiver , which can receive ACTION_SCREEN_OFF . 2.In the onReceive method of this BroadcastReceiver , I start an activity as the screensaver. 3.In the activity, I write Log.i() statement to track its running. My question is: When the screen times out, or when I press the POWER key, the screen

Windows screensaver multiple instance

邮差的信 提交于 2019-12-13 18:26:55
问题 So, a windows screensaver is just an exe that is passed one of 3 parameters. /c for config screen /s for fullscreen /p <hwnd> for the little preview window. I have everything working peachy except I have multiple processing running (this is the problem). When you have the windows screensaver picker window open and select my screensaver, it launches it with /p so that it can show a preview. If you click the settings button, it will call my sreensaver again with /c. Now I there are two