如何发现Windows当前桌面背景是哪个图像文件? [英] How to discover which image file is the current desktop background on Windows?
本文介绍了如何发现Windows当前桌面背景是哪个图像文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以通过编程方式找到它吗?它将使用Windows注册表吗?我需要对其进行截图并与磁盘上的文件进行比较吗?即使在桌面幻灯片放映模式下也可以发现吗?
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?
推荐答案
public string GetCurrentWallpaper()
{
using(var subKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Desktop\General", false))
{
return subKey.GetValue("WallpaperSource").ToString();
}
}
这篇关于如何发现Windows当前桌面背景是哪个图像文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文