RSS Screen Saver

Ok so I want to change the default RSS link and the default IMG, how do I go about this You SUGGEST I do it at the bottom of the tutorial but provide absolutely no guidance on how to do it.. Whats up with that I've tried replacing the images in the resource file with new pictures but keeping the same file name, that did not do a single thing,

// The images to display in the background

private List<Image> backgroundImages;

private int currentImageIndex;

There is that in the code, but there is no explanation on what any of the variable means, nor how you edit them. This applicatoin is near useless to a new coder because the tutorial included with it tells you how to use the program, now how to edit and expand it.  How are we supposed to laern anything from this if there isn't a very large documentation on it One page describing the absolute basics that I could have just found out myself in a few seconds isn't very helpful. Explaining how to do the things you suggest WOULD be helpful as they are more advance then just common sense. Pretty messed up that you add in things you CAN do that look really cool and make people want to do them, then provide no basis for how to go about it.

Ok so I was messing around and I put this in the very font after 

private void LoadBackgroundImage()

{

// Initialize the background images.

backgroundImages = new List<Image>();

currentImageIndex = 0;

I added (copied and pasted from lower section)

{

// If the background images could not be loaded for any reason

// use the image stored in the resources

backgroundImages.Add(Properties.Resources.SSaverBackground);

backgroundImages.Add(Properties.Resources.SSaverBackground2);

}

right after that, however, now it loads those all the time even when I change it thru the options thing in /c



Answer this question

RSS Screen Saver

  • randomwanderer

    Thank you. I went to extravogent lengths to try and get it working the way I want and I edited tons of files and I doubt it would work like it was supposed to if I compiled it and sent it to someone. I'll just reinstall a fresh copy of it and do what you said, thanks.
  • paul002000

    Hi there,

    The default RSS link and background images aren't actually defined in the code per se....Investigation shows that they are defined in the application's properties.

    To view these, in the Solution Explorer in the IDE, do the following:

    1) There should be a node in Solution Explorer called "Properties" (you might have to expand a few nodes to see it, it is there though)

    2) Expand the "Properties" node and there should be a sub-node called "Settings.settings"

    3) Double click on the "Settings.settings" node

    4) A new tab will appear in your IDE. This tab will contain a table with two rows, one row should have an entry called "BackgroundImagePath" and another entry called "RssFeedUri".

    5) Set the entry in the "Value" column in the row for "BackgroundImagePath" to point to a folder location where your desired background images are stored.

    Change the entry in the "Value" column in the row for "RssFeedUri" to point to your desired RSS Feed.

    Also, I would remove the code you had copied and pasted in (as you said in your previous post), unless you actually want to have the default images that came with the Screen Saver Kit displayed in addition to your own images. If you do want this, the easy way to do this is to change the LoadBackgroundImage() function so that it becomes:

    private void LoadBackgroundImage()

    {

    // Initialize the background images.

    backgroundImages = new List<Image>();

    currentImageIndex = 0;

    if (Directory.Exists(Properties.Settings.Default.BackgroundImagePath))
    {
    try
    {
    // Try to load the images given by the users.
    LoadImagesFromFolder();


    //Load the defaults anyway
    LoadDefaultBackgroundImages();
    }
    catch
    {
    // If this fails, load the default images.
    LoadDefaultBackgroundImages();
    }
    }

    // If no images were loaded, load the defaults
    if (backgroundImages.Count == 0)
    {
    LoadDefaultBackgroundImages();
    }

    }


    If you now compile and run your program, you will now see your desired background images and RSS Feed rather than the default.

    Hope that helps a bit, but sorry if it doesn't.

    PS. If you want to comment or make suggestions on the Visual Studio range of products, you can do so via VS Product Feedback and have it looked at by MS and a whole community of people who aim to improve, among other things, customer experience using the Visual Studio range of products.


  • RSS Screen Saver