desktop-background

Getting desktop background on Mac

偶尔善良 提交于 2019-12-21 02:07:13
问题 How do I get the current wallpaper on a Mac? Just point me to an API function so I can Google more. Edit: I think I found it. [NSUserDefaults standardUserDefaults] mentioned at http://lists.apple.com/archives/student-dev/2004/Aug/msg00140.html Also possible from shell: defaults read com.apple.desktop Background And from AppleScript: http://discussions.apple.com/thread.jspa?messageID=7111272 回答1: Updated Answer (Mavericks and newer) Starting with Mavericks, Apple writes the Desktop images to

How to discover which image file is the current desktop background on Windows?

可紊 提交于 2019-12-07 21:07:56
问题 It is possible to discover it programatically? It will use the Windows Registry? I'll need to take a screenshot of it and compare with the files on disk? Is it possible to discover even in the desktop slideshow mode? 回答1: try this using Microsoft.Win32; private string GetCurrentWallpaper() { using(RegistryKey MyWallPaper = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", false)) { return MyWallPaper.GetValue("WallPaper").ToString(); } } Bye. 回答2: public string GetCurrentWallpaper() {

How to discover which image file is the current desktop background on Windows?

☆樱花仙子☆ 提交于 2019-12-06 12:35:25
It is possible to discover it programatically? It will use the Windows Registry? I'll need to take a screenshot of it and compare with the files on disk? Is it possible to discover even in the desktop slideshow mode? RRUZ try this using Microsoft.Win32; private string GetCurrentWallpaper() { using(RegistryKey MyWallPaper = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", false)) { return MyWallPaper.GetValue("WallPaper").ToString(); } } Bye. public string GetCurrentWallpaper() { using(var subKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Desktop\General",

Getting desktop background on Mac

十年热恋 提交于 2019-12-03 08:17:44
How do I get the current wallpaper on a Mac? Just point me to an API function so I can Google more. Edit: I think I found it. [NSUserDefaults standardUserDefaults] mentioned at http://lists.apple.com/archives/student-dev/2004/Aug/msg00140.html Also possible from shell: defaults read com.apple.desktop Background And from AppleScript: http://discussions.apple.com/thread.jspa?messageID=7111272 Updated Answer (Mavericks and newer) Starting with Mavericks, Apple writes the Desktop images to /Users/<current-user>/Application Support/Dock/desktoppicture.db which is an SQLite database. You can open