i'm trying to make a live wallpaper, i use the SystemParametersInfo method but it's very slow, 1 frame takes about 3 seconds to install, i have a folder with 250 frames and i put them on the desktop one by one in a loop, tell me how to do it right?
Code here:
private async void LoopFrame(string folder, int framesCount)
{
await Task.Run(() =>
{
int i = 0;
while (true)
{
if (i > framesCount) i = 0;
string framePath = $"{folder}\\_Frame{i}.jpg";
SystemParametersInfo(0x14, 0, framePath, 0x01 | 0x02)
i++;
}
});
}