wallpaper

Notification when desktop wallpaper changes?

☆樱花仙子☆ 提交于 2019-12-06 06:43:45
问题 is there any kind of notification available for when the desktop wallpaper is changed? Thanks! 回答1: [[NSDistributedNotificationCenter defaultCenter] addObserver:target selector:@selector(desktopImageChanged:) name:@"com.apple.desktop" object:@"BackgroundChanged"]; should to the job 来源: https://stackoverflow.com/questions/5673045/notification-when-desktop-wallpaper-changes

Change wallpaper in Python for user while being system

落花浮王杯 提交于 2019-12-06 05:00:32
what I am trying to do is change the desktop wallpaper in windows. To do that, I use the following code: import ctypes import Image pathToBmp = "PATH TO BMP FILE" SPI_SETDESKWALLPAPER = 20 ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, pathToBmp , 0) this works when I run the .py file, this works when I convert it using py2exe and run the exe under the current user, but when I run the exe as SYSTEM, the current user background does not change. This ofcourse was to be expected. But I don't know how to solve it. By the way, it does not matter if any of your solutions changes

Cropping Picture on Droid X sets resulting image as wallpaper

时光总嘲笑我的痴心妄想 提交于 2019-12-06 04:34:37
问题 I'm running into an issue with my program when trying to crop an image selected by the user from their gallery. The issue so far only appears when running on a Droid X, as running on the original moto Droid works fine. Basically the issue occurs as the cropping intent is being run. Once the user crops the photo and clicks the save button, it replaces the wallpaper on the main screen with the cropped image that was saved! It does not do this on the moto droid, or emulators. Below is the code

Is there any code to set wallpaper without cropping and zooming in android?

十年热恋 提交于 2019-12-05 11:00:16
i am creating a gallery app , my first app and this is my code Bitmap bmd = BitmapFactory.decodeStream(is); try{ getApplicationContext().setWallpaper(bmd); }catch(IOException e){ e.printStackTrace(); } The above code sets wallpaper But the wallpaper gets cropped or zoomed after it got set !! Is there any modification i can do in the above code so that i can set wallpaper without zooming or cropping when it is set !!!! Plzzzz help me out !! Thanks in advance :-) I am late to reply this. Hope it helps you and those who visits your question: In your case, try to adjust your picture to device size

How to set image as wallpaper from the ImageView?

删除回忆录丶 提交于 2019-12-05 05:56:22
问题 I have an activity in which there are two Buttons and an ImageView. One button is to take image from the Camera application of the phone and set it to the ImageView, and other Button is to set that image as the Home screen wallpaper so i want the code how to set this image from the ImageView to the wallpaper??????? 回答1: Step 1: Get the image attached to the ImageView. Setp 2: Set that image as Wallpaper. Step 3: Add permission in the AndroidManifest.xml to set wallpaper! For step 1 check This

Set app background to be the same as home screen wallpaper

£可爱£侵袭症+ 提交于 2019-12-05 02:23:27
I want to set my app's background to be the same as my home screen's wallpaper. How can I get the home screen wallpaper in activity.xml? Can I do that? Use final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); final Drawable wallpaperDrawable = wallpaperManager.getDrawable(); to get the current wallpaper. Then set it as your own app's background: LinearLayout ll = (LinearLayout) findViewById(R.id.myLinearLayout);//Substitute with your layout ll.setBackground(wallpaperDrawable); All this should happen in the onCreate() if you wish to have it as the initial background.

Refresh wallpaper in win7 via command line

ε祈祈猫儿з 提交于 2019-12-04 19:26:36
I want to refresh wallpaper in Windows 7 from command line. I'm setting wallpaper via reg.exe add . rundll32.exe user32.dll,UpdatePerUserSystemParameters doesn't work (with 1,True or 1,False ) Requirements: It must refresh wallpaper immediately (no waiting) It must run from command line Default windows 7 command line is preferred. Writing a c++/VB/C# program is acceptable, but not as good as a default win7 cli solution. Jon Dev Killing explorer is never a good idea, try this: RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters 1, True At least on Windows 7 64-bit, I found that the rundll32

Detect multiple monitors and set separate wallpapers for each

被刻印的时光 ゝ 提交于 2019-12-04 18:14:55
I'm starting a project to make a wall paper rotator for computers with multiple monitors. 1) how do you detect the monitors in windows and the associated resolution 2) how would i set the image per monitor. do I make one image that's crafted together or do I set each one individually and how? thanks Cecil Has a Name You can get information about all screens using the System.Windows.Forms.Screen class. Use their bounds properties to determine their layout. Not possible on Windows (XP), you'll have to craft a big background image using the drawing routines in System.Drawing. This "thread"

IActiveDesktop wallpaper fade effect not working after restart

北战南征 提交于 2019-12-04 16:52:59
Am I missing something using IActiveDesktop? Sympthoms: After system (Win7/Win8) restart fade effect during wallpaper change disappears. To restore it I have to manually go to "Personalization->Desktop Backgrounds" and set "Picture Location" from "My Pictures"(?) back to "Windows Desktop Backgrounds" and then back(!). After this action fade effect is working fine again until the next system restart. I don't understand what reverts it back and how to stop it. How to set "Windows Desktop Background" option programmatically? What system does in background? Code itself is pretty standard and taken

How to set Wallpaper style (Fill, stretch) according to windows version

耗尽温柔 提交于 2019-12-04 16:16:37
I am trying to make a wallpaper style stretched if Windows version is Vista, and Fill in case of windows 7, in VB.NET. I got the program to change a Wallpaper , but Im having a problem with applying a style. ( Program consists of a browse button, picture box and Apply button). Your help would be appreciated. Here is the code : Imports System.IO Imports Microsoft.Win32 Imports System.Environment Imports System.Drawing.Imaging Imports System.ComponentModel Imports System.Runtime.InteropServices Public Class Form1 Private Property c As Object Private Declare Auto Function SystemParametersInfo Lib