I have created a program which takes .GIF images, seperates them into seperate files. Then there is a timer which calls a method to read a file in the sequence and changes the wallpaper. I was just wondering if there is anyway I can make this process take less time. (It works, just not fast enough...)
Note: I know this may be unchangeable for the Desktop is not made for this kind of thing, but I'm wondering if there is maybe even an untidy dirty hack in which I could accomplish this...
Windows Forms C# Code:
private void CreateAllFramesInTemp()
{
for (int i = 0; i < TOTALFRAMES; i++)
{
GIF.SelectActiveFrame(GIFDIMENSION, i);
GIF.Save(tempPath + i.ToString() + ".bmp", ImageFormat.Bmp);
}
updateInterval.Start();
}
private void updateInterval_Tick(object sender, EventArgs e)
{
if (currentWallpaperFrame < TOTALFRAMES)
{
currentWallpaperFrame += 1;
}
else
{
currentWallpaperFrame = 1;
}
//_-_-_-_-This sets the wallpaper-_-_-_-_//
SystemParametersInfo(20, 0, tempPath + (currentWallpaperFrame - 1).ToString() + ".bmp", 0x01 | 0x02);
}
Ask me any questions about the code if you don't know what a specific part is.