Tho*_*asT 5 .net c# vb.net visual-c++ windows-10
如何以编程方式更改/设置锁定屏幕背景图像(使用VB.NET,C#或Visual C++)?我正在使用Win 10 Pro并拥有Visual Studio 2017 Pro.
我在网上看过,但大多数解决方案似乎都不起作用.例如:
System.Windows.Media.Imaging,Windows.Storage,Windows.Storage.Streams,Windows.System.UserProfile不能当我粘贴代码中发现的.我是否需要添加特定参考?似乎建议大多数源(也是Windows开发中心 - LockScreen类),
Windows.System.UserProfile.LockScreen.SetImageFileAsync(file);
但我显然缺少特定的命名空间/导入/包以使其运行.
任何帮助,将不胜感激.
我已经找到了使用Windows 10 Pro锁屏质量更改这个问题的简便方法。我需要做的就是在下面设置注册表项
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP
DesktopImagePathDesktopImageUrlLockScreenImagePathLockScreenImageUrl到所需图片的路径,而无需使用UWP或WPF。