General Overview
Here you will find out about all the features of this program. ^_^
This program randomly selects an image from given locations and then sets that image as the wallpaper while attemting to figure out the best way of putting that image.
Features
This is a tray-icon based program so you will see a tray icon once you start the program. Right-clicking on it will bring up the menu.

As you can see, you can change the background if you either double-click on the tray icon, or select the "Change the Background" option in the menu.
"Manually Select Image" option was at first made for debugging purposes (to see if SetWallpaper() worked), but since I ended up using it anyway, I just left it. You can pick any valid image and set it as the wallpaper with this option. ^_^

"Manually Select Location"'s idea came about when I was watching some anime. lol. I wanted the program to pick images from a certain folder only, but that feature hadn't been implemented (I was using the timer to set it every 5 minutes so with this option it could become like a slideshow of sorts), so I decided to make it so that it could, now if you choose "Manually Select Location" option, then a folder-choosing dialog will pop-up.

Now choose a folder that contains images and it will randomly select an image from that folder and set it as wallpaper. You CAN make the location be kinda permanent, until you restart the program if you have an option set in the Options Dialog.

Options Dialog
Here you'll know about the Options Dialog box. We'll first start with the General options.

First option specifies where the background will be saved at. Windows converts all non-bitmap(BMP) images to bitmaps so the converted image MUST be saved somewhere. Windows hides this process from you. So, this will save the image it picks to that file. So, if you have the timer on, then this file that you specify in this edit box, will get overwritten every given minutes.
The first check box specifies whether the program will show you the file name of the image it picked. It doesn't show as much as when showing the debug info, but it shows something... By default all checkboxes are off. The settings that you see in this screenshot is what I currently use.
The Enable Timer checkbox enables the changing of the background at minute intervals given in the small edit box. I usually have it enabled to change the background change every 5 minutes. Well, when you have about 2700+ images... it's handy. =P lol
The automatically starting of the program is done through the registry. It will first write to the registry in HKCU, then in HKLM. When autostarting, it WILL change the background once. If you have the other checkbox set, it WILL exit AFTER changing the background once.
Next is the Advanced General Options dialog

The next 2 edit boxes are about maximum file sizes for both bitmaps and non-bitmap files. By default, the maximum file size for bitmap images is set to be 4 MBs, and for non-bitmap images is set to be 1MB. I have some jpeg images that are 4MBs and... they were really slowing down the whole system whenever I tried to set them as the background... so I added these options. A 800x600 16-bit bitmap is about 1.2MBs, so I think that the default values are ok.
If something doesn't work quite right, you can have the program show debug info. Here's a look at the message log window and a sample listing of the log file

Background Application Log
Time of Log : Mon Mar 01 12:49:49 2004
Initializing...
Current Windows Version : Microsoft Windows XP Professional
Location chosen : E:\Anime\Images
Gathering all directories in E:\Anime\Images
Gathered 78 directories from E:\Anime\Images
Gathering all directories in E:\Anime\Images/D.N. Angel
Gathered 0 directories from E:\Anime\Images/D.N. Angel
Directory picked : E:\Anime\Images/D.N. Angel
Directory to use : E:\Anime\Images/D.N. Angel
Gathering all valid image files in E:\Anime\Images/D.N. Angel
Gathered 2 image files from E:\Anime\Images/D.N. Angel
Image files gathered from E:\Anime\Images/D.N. Angel
Number of items in the Previous List : 18 of 500
Current Screen Resolution : 800 x 600
Current Color Mode : 16 bpp
Loading E:\Anime\Images/D.N. Angel\DNAngeL_-Dark_and_Daisuke.jpg for processing...
Calculating wallpaper mode...
Image Dimensions : 1024 x 768
Image considered small == false
Screen ratio 4 : 3
nDiff2 == 0
nXDiff2 == -28 | nYDiff2 == -28
Difference between the heights of image and screen == 168
Wallpaper Style : Stretched
New image dimensions : 800 x 600
Center Tiling Calculations
New image dimensions : 800 x 600
nXRepeat == 1 | nYRepeat == 1
nXOffset == 0 | nYOffset == 0
Scaling the image to fit the screen...
Saving scaled image to file...
Setting E:\Anime\Images/D.N. Angel\DNAngeL_-Dark_and_Daisuke.jpg as wallpaper...
Wallpaper has been set to E:\Anime\Images/D.N. Angel\DNAngeL_-Dark_and_Daisuke.jpg
As you can see, a lot of debug info is displayed. So, if anything doesn't work quite right, you can save the log file to see how things are going and check the code to see if it is wrong or something, or you could send it to me ^_^ to check on it too. ^_^
Next is the Location Tab

In here the locations where the image files are at are entered. As you can see there are 4 locations entered here. They all have a percentage, the higher the percentage, the better the chance of getting picked. They also have an "Include Root" column. This indicates whether to pick the files directly from that location folder OR to first go into a subdirectory THEN start picking files. As you can see the first location is set to not include root, which means that any image picked from that location is actually picked from one of the subdirectories within that location.
The Add location dialog and the Advanced Location Options Dialog are pretty much self-explanatory so I'll skip them. =P The Advanced Location Dialog only deals with the "Previous List" that the program keeps and is explained in the dialog box. OK, next is the Scaling options tab

This tab is pretty much the most important one. First, you can have the program scale a big image down, or stretch some small images. Center Tiling is a term I coined. lol =P Well, certainly I hadn't heard it before. lol =P. To know more about it, click on "Center Tiling Info" button. About scaling and stuff... there's not really much to say... the checkboxes are rather self-explanatory... at least to me. =P The Advanced Scaling/Image Options Dialog... only go there and change stuff if you understand how the program works (look at the source code)... Or experiment around (thank God for "Restore Default value buttons" =P). The most important aspect of this program is in setting an image as the wallpaper and many of the options used for it are in the Advanced Scaling/Image Options dialog box. So, if you change things around and it doesn't work anymore, use the "Restore Default Values" button... and read everything!!! (including the SetWallpaper() code ^_^)
And that's it for this section. I hope you liked my little tour into the Background Changing App. ^_^
No comments:
Post a Comment