Because I'll forget if I don't write it down.
RSS icon Email icon Home icon
  • Intellisense not working via COM

    Posted on August 13th, 2009 Dave No comments

    I recently needed to write a class in C# that would be accessed by a VB6 application – something quite new to me.

    The existing VB6 application (which is in the process of being rewritten in C#) currently uses OLE Automation to generate MSWord documents based on templates. While this approach was working fine it was pretty slow. Having made the decision that the new version of the application would be capable of generating Word 2007 documents it was decided that the resulting class should be accessible to the VB6 application via COM Interop.
    Read the rest of this entry »

  • Reading an RSS Feed with C# and Python

    Posted on May 5th, 2009 Dave No comments

    When I started this site I had a project in mind that would download Podcasts as they were posted and maintain the content of my MP3 player so that I didn’t have to do it myself. Well since then I have lost my iTunes virginity and while it doesn’t do everything that I wanted (like telling me that a new episode has been downloaded) it does automatically download and delete them once I’ve watched/listened to them.

    But just because I don’t need to develop a complete application there is still an itch to scratch here – a few of them in fact.

    • How do I download an RSS stream – it’s not just podcasts that uses them
    • How do I parse the resulting XML
    • How do I download a file and store it locally
    • and how do I do this in C# and Python

    Well this post will answer the first two questions using C# and LINQ and Python and it’s XML library.
    Read the rest of this entry »

  • Dirty Checking and the .NET GridView

    Posted on February 25th, 2009 Dave 6 comments

    Most Web Developers have come across this problem at one time or another, how do I stop someone navigating away from a page if they have not saved any changes they have made?

    The answer is that you need to employ ‘Dirty Checking’, basically set a flag when the page data is changed and check it if the user tries to navigate away. Sounds simple (and in many instances it maybe) but I have encountered a problem recently (today!) which took some thought to get around. Read the rest of this entry »