SharpLocker icon indicating copy to clipboard operation
SharpLocker copied to clipboard

Enhancements

Open keldnorman opened this issue 4 years ago • 13 comments

sharplocker2

To get the current background image:

Image myimage = new Bitmap(@Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\Themes\\TranscodedWallpaper"));

and to get the account picture:

RegistryKey AccountPictureReg = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\AccountPicture", true);
string AccountPictureFilename = AccountPictureReg.GetValue("SourceId").ToString();
AccountPictureReg.Close();

string AccountPicture = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\AccountPictures\\" + AccountPictureFilename);

Console.WriteLine(" Value: " + AccountPicture);

keldnorman avatar Jan 17 '20 08:01 keldnorman