7/7/2023 0 Comments Open .scr files in windows 10Static extern int LoadString(IntPtr hInstance, int wID, StringBuilder lpBuffer, int nBufferMax) īasically, the display name of the screensaver is the first resource string in the. Static extern bool FreeLibrary(IntPtr hLibrary) Static extern IntPtr LoadLibrary(string lpFileName) LoadString(hLibrary, 1, sb, sb.Capacity) StringBuilder sb = new StringBuilder(1024) Public ScreenSaverInfo GetScreenSaverInfo(string filename) If (!string.IsNullOrEmpty(screenSaverExe))ĬurrentSSPath = Path.GetDirectoryName(screenSaverExe) ĭirectories.Add(Environment.GetFolderPath()) ĭirectories.Add(Environment.GetFolderPath(86)) įoreach (string file in Directory.EnumerateFiles(dir, "*.scr", SearchOption.TopDirectoryOnly)) String screenSaverExe = desktopKey.GetValue("SCRNSAVE.EXE") as string Using (RegistryKey desktopKey = Panel\Desktop")) This question is a bit old, but I just had to solve the same problem and came up with the following solution: public class ScreenSaverInfo
0 Comments
Leave a Reply. |