Blogs

  • Announcement: Welcome to Windows Coding 2.0

  • Convert your firefox favorites and feeds into IE7 with "Firefox To IE7"

    Currently there is no way to import your firefox favorites and feeds into IE7, and from what I have heard there is no plan on adding this into IE7.  So with this in mind, I made this application so that developers or anyone who needs to use their firefox bookmarks in IE7 can do so easily. 

    All you have to do is run the application and if you have firefox installed it will automatically find your bookmarks, or you can browse for your exported firefox “bookmarks.html” file.

    After you have found the bookmark file that you wish to import into IE7, click Process and your bookmarks have been successfully imported.

    Please remember to check our forums to report any bugs that you might encounter; Please refer to the readme.txt for already known bugs.


    Download (32bit - 64bit). Please note that you will no longer need a 3rd party file extractor as all downloads are now in zip format.

    Minimum Requirements

    Posted to Blake Niemyjski by Blake Niemyjski on 07-25-2006
    Filed under: , ,
  • Working with the Windows RSS Platform (C#)

    If you don’t know what RSS is, then you have been hiding under a pretty big rock lately. A lot of Microsoft’s products are currently out or are coming out in the next year use the Windows RSS platform. To name a few of these products off the top of my head are as follows: IE7, Office 2007, Windows Live Mail Desktop, and Windows Vista. I’m pretty sure that sometime in the next couple of years you will more than likely be working with RSS in one or more of your applications.

    During the past week I have been working with the Windows RSS platform in one of my applications. My adventure into the unknown lands of the Windows RSS platform was quite an experience; I found out that the MSDN documentation tends to be very helpful, but real world examples tend to be a little scarce.

    For that reason, I’ll show you how to easy it is to use the Windows RSS platform in your C# 2.0 Application to create an IE7 Feed in the root or subfolder of the Feeds Folder.

    1. Open Visual Studio 2005 and create a new Windows Application.
    2. Open the Solution Explorer and right click References and click “Add”.
    3. Switch to the COM tab and find “Microsoft Feeds, version 1.0”.

       

      You should now see “Microsoft.Feeds.Interop” in your References List.

    4. Add “ using Microsoft.Feeds.Interop ;” to the top of your Form1.cs
    5. Create  a new method called AddIE7Feed that returns a Boolean and takes 3 String parameters (folder, URL, title).

      It should look like this:

      private bool AddIE7Feed(string folder, string url, string title)

      {

      return true;

      }

    6. Next lets add some code to AddIE7Feed.
      FeedsManager fm = new FeedsManager();
      IFeedFolder rootFolder = (IFeedFolder)fm.RootFolder;
      IFeedFolder subFolder = rootFolder; 

      try

      {
      //if a folderpath is supplied the following code is executed.

      if (folder != string.Empty)

      {

      //checks to see if the folder exists.

      if (!rootFolder.ExistsSubfolder(folder))

      {

      //creates the folder if it does not exist.
      rootFolder.CreateSubfolder(folder);
      //set the subFolder to the new folder.
      subFolder = (IFeedFolder)rootFolder.GetSubfolder(folder);

      }

      }

      //checks to see if the feed exists (by checking the url and title).

      if (!subFolder.ExistsFeed(title) && !fm.IsSubscribed(url))

      {

      //creates the feed if it does not exist.
      subFolder.CreateFeed(title, url);
      return true;

      }

      return false;

      }

      //catches any Exception that may be throw
      catch (Exception) {
      return false;

      }

    7. Let s add a feed by adding a few lines of code in the Form1_Load

      //Please note if the url to the feed already exisits anywhere in the feeds folder an exception will occur.

      //Add a feed called "windowscoding.com" to the root feeds folder.

      if (AddIE7Feed("", "http://windowscoding.com/blogs/MainFeed.aspx", "windowscoding.com"))

      {

      MessageBox.Show("Feed was added successfully");

      }

      else

      {

      MessageBox.Show("Failed to add the Feed");

      }

      //close the application.

      this.Close();

    8. Run the application and then open IE7 and you should see the feed above.

     

      I know that this application does not have any User Interface it is purely meant to be an example on how to use the Windows RSS Platform with IE7.

     

    I have compiled a list of links that I believe anyone working with the Windows RSS platform should read.

    Microsoft Team RSS Blog

    http://blogs.msdn.com/rssteam

    Windows RSS Platform Reference

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/feedsapi/rss/reference/entry.asp

    Using the Windows RSS Platform

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/feedsapi/rss/overviews/msfeeds_ovw.asp

    Valid Feed and Folder Names (Must Read)

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/feedsapi/rss/overviews/name_ovw.asp

     

    To download the Visual Studio project and source follow the link below.

    Working with the Windows RSS Platform Sample Application (C#)

     

    Please note that the code in section six has been updated. In some circumstances if you only check if the feed exists by the name an exception will be thrown.

    Posted to Blake Niemyjski by Blake Niemyjski on 07-17-2006
    Filed under: , ,
windowscoding.com;
Copyright © 2008 Windows Coding
Microsoft and Microsoft logo's are trademarks of Microsoft Corporation.