A few days ago I wasn’t feeling very well so I got onto my computer and decided I should make something to pass the time. I decided to create a program that will switch the background picture of the computer however many seconds you want it to, and will load the pictures from a specified folder. The first version worked great but it could be made better and it started off using 30MB of memory and it kept going up. So I created a new one that allows you to specify between ‘Tiled, Centered, or Stretched’ also prior to this version I was storing all my settings in a text document and getting them with a StreamReader like this
string str1 = reader.ReadLine().ToString();
I then switched to storing the settings in the Registry and I cut my memory usage costs in half to 15MBbut it was still going up every time the picture changed. SO I then did it again made little tweaks to it, found out that the image wasn’t being disposed of from the temporary image object. So I called an Image.Dispose(); and that solved the problem. Now the app runs within the 6 to 8MB range depending on the size of image that is on screen.
Here is a link to try it out I compiled it for x86.
Here is the link to the MSI:
http://tinyurl.com/ddr7hd
Here is the link to the zipped archive
http://tinyurl.com/d6vnwh
If you get a network error while installing, you need to unzip it prior to installation.
Have fun and please tell me what you think, and post any suggestions for a new version. Share it with family and friends.
If you liked this program please support it by making a donation.
No comments:
Post a Comment