How can I programmatically change/set the lock screen background image (using VB.NET, C# or Visual C++)? I am using Win 10 Pro and have Visual Studio 2017 Pro.
I've had a look online but most solutions don't seem to work. For example:
- Both Change Win 10 Lockscreen Image Mutiple Times C# WPF and Change Windows Lock Screen background image in C# provide sample code but the imports
System.Windows.Media.Imaging
,Windows.Storage
,Windows.Storage.Streams
,Windows.System.UserProfile
cannot be found when I paste the code. Do I need to add specific references? - Lock screen personalization sample looks very promising but upon opening the solution/project file, Visual Studio throws an error saying that the provided format is unreadable.
Most sources (also Windows Dev Center - LockScreen Class) seem to suggest
Windows.System.UserProfile.LockScreen.SetImageFileAsync(file);
but I am apparently missing the specific namespace/import/package to make it run.
Any help would be appreciated.