wallpaper

Tile/Center image in the forms background

£可爱£侵袭症+ 提交于 2019-11-28 04:57:04
问题 Is there a way to place an image in the form background and be able to tile it or center it ? Also I need to place other components on top of the image. I tried rmControls but I cannot place anything on top of the image. 回答1: You can paint your image in an OnPaint handler for the form. Here's a simple example of tiling: procedure TMyForm.FormPaint(Sender: TObject); var Bitmap: TBitmap; Left, Top: Integer; begin Bitmap := TBitmap.Create; Try Bitmap.LoadFromFile('C:\desktop\bitmap.bmp'); Left :

Android - How to set the wallpaper image? [duplicate]

寵の児 提交于 2019-11-27 19:33:20
Possible Duplicate: Android - how to set the wallpaper image What i'm trying to do is, set the wallpaper using an image URI (no cropping) I'm a noob at dev on Android and dev in general. The internet has failed me... on providing code to set the wallpaper. yes the dev resource site says public void setStream (InputStream data) but i don't understand it, some sample code would greatly help me. Maidul Hi you can use this code if You have Image path. is = new FileInputStream(new File(imagePath)); bis = new BufferedInputStream(is); Bitmap bitmap = BitmapFactory.decodeStream(bis); Bitmap

Android app to change wallpaper at regular intervals using Timer

谁都会走 提交于 2019-11-27 17:03:22
问题 I wish to create an app, which would change the wallpaper of the Android device at fixed intervals, say every hour or so. Currently in my code, I start a service and am using a Timer object. The Timer object would be invoked at regular intervals and change the wallpaper. This is the code I am using currently. The wallpaper gets changed only once and not after that. Please let me know what should I do? public class Wallpaper extends Service { Timer mytimer; int interval=60000; Drawable

Android set image as wallpaper

只愿长相守 提交于 2019-11-27 16:58:33
问题 Please show me an example code on how to set image as wallpaper using Android WallpaperManager. I have shortened and edited my question. Hopefully you guys could understand my question. I will show some attempts I have made. HomeActivity.class public class HomeActivity extends BaseActivity { String[] imageUrls; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_home); ArrayList<String> url = new ArrayList<String>(); try {

Programmatically changing the iOS lock-screen

情到浓时终转凉″ 提交于 2019-11-27 08:23:36
I'm building an app which would have to have the ability to show my own views on the iPhone lock screen. I've seen lots of apps which let you customize the lockscreen and so forth and these were App Store apps so i'm guessing it has to possible. I just can't figure out what to use in the iOS SDK to even try implementing this. Oh and P.S: same goes for wallpapers—can we change this from inside our app? Norbert It can be changed programmatically (change to SpringBoard), but it won't make the way to the (official) AppStore. So if you want to build an app that can change something like the lock

Pcmanfm set wallpaper fails on Raspbian stretch in cron

坚强是说给别人听的谎言 提交于 2019-11-27 08:09:06
问题 I am running a nearly fresh image of Raspbian Stretch 4.9 with a desktop and have a program which creates a new image for the computer background every few minutes. I am trying to create a cron job to properly update the background using pcmanfm and, having followed the suggestions here, have created the following script called update.sh to set the background: !#/bin/bash export DISPLAY=:0 export XAUTHORITY=/home/pi/.Xauthority pcmanfm -w '/home/pi/folder/image.png' The script is executable

Setting iPhone wallpaper (locked screen background) programmatically?

不羁岁月 提交于 2019-11-27 07:04:13
问题 I have an app which could benefit from the user being able to choose to set an image as the wallpaper (the background image on the "slide to unlock" screen). Is there a way for non-jailbreak third-party apps to do this? A search for "wallpaper" in the iPhone documentation returns nothing. 回答1: There is no way to do this with the current SDK, if you want to do it you should file a bug. 回答2: If you're writing a jailbreak application you can write to /var/mobile/Library/LockBackground.jpg and

Android - How to set the wallpaper image? [duplicate]

孤人 提交于 2019-11-27 04:22:32
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Android - how to set the wallpaper image What i'm trying to do is, set the wallpaper using an image URI (no cropping) I'm a noob at dev on Android and dev in general. The internet has failed me... on providing code to set the wallpaper. yes the dev resource site says public void setStream (InputStream data) but i don't understand it, some sample code would greatly help me. 回答1: Hi you can use this code if You

Changing Wallpaper with a batch file, on program close. Possible? [closed]

允我心安 提交于 2019-11-27 02:54:35
问题 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 5 months ago . I'm trying to create a batch file that will change my background when a program closes on Windows 7. I've tried using this, but it doesn't work, even when I log off and log back in: @echo off reg /add HKCU\Control Panel\Desktop\WallPaper /v wallpaper /t REG_SZ /d c:\images\wallpaper.bmp 回答1: There are some

Get current wallpaper

本小妞迷上赌 提交于 2019-11-27 02:19:48
问题 I'm pretty new to Android programming so bear with me. I was wondering if there was a method of retrieving the current wallpaper on an android device and saving it to a variable in your app's code. Thanks 回答1: final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); final Drawable wallpaperDrawable = wallpaperManager.getDrawable(); 回答2: This is the good way to do that: WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); Drawable wallpaperDrawable =