SurplusCode

C#, PHP, CSS, DHTML, AJAX

Archive for September, 2006

Friday
Sep 22,2006

I don’t remember why, but for the longest time I have been searching for a tool or code that would allow me to create a screen shot and thumbnail of an entire web page. Lately, I have been using Cropper, as well as the old ”Print Screen” and cropping the image in Photoshop technique. This normally does the job. But what if the web page is rendered to be taller than the available screen height?

I am sure there is a tool that does what I am looking for, but I haven’t found it yet…until today. Well, I almost found it. What I found instead was two articles on Code Project. And then after a couple hours in Visual Studio, presto-chango, I give you the Web Page Thumber.

It’s actually just a prototype, built on top of dooskoobi’s “Webpage Thumbnailer“ source code. Credits also go to a reply comment by gimenezparera to Douglas M. Weems’ “Image Capture Whole Web Page using C#” article. This last one pointed me to the System.Windows.Forms.WebBrowser component, specifically using WebBrowser.Document.Body.ScrollRectangle.Height to find the rendered web page height.

I have  provided an executable download of my hacked version of the Webpage Thumbnailer. You will need .NET 2.0 Framework or redistributable package  installed.

Executable: Thumbnailer.zip

The interface should be fairly straightforward, but here are a couple tips. ”Browser Width” is the width of the browser to render the web site at when the full size screen shot is taken. This is useful if you want to get a thumbnail/screen shot at different resolutions to see if the content shifts or not. To “Save a thumnail”, right-click on the image (or double-click on it). Currently, it only supports png as the output format.

One big note, it does NOT work with all web sites. I don’t know why, but it just doesn’t. I will take a look at it when I have more time.

  • Comments Off
  • Saturday
    Sep 9,2006

    I installed a newer version of VistaDB 2.x than what is in SourceSafe and in my project’s reference, and when I tried to run the app in Visual Studio 2005, it was asking me for the newer version of VistaDB.Provider.dll (2.20.25.0). And since my project only had reference to 2.20.22.0, it was a no go.

    I spent an hour or two uninstalling the newer version, searching for and getting rid of all the new dlls, and verified all remaining VistaDB dlls on my hard drive to be the correct versions. It still didn’t work.

    I finally fixed the problem when I searched the registry for the offending newer version, and removed references to it. Specifically the unwanted registry keys are found below:

    HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Fusion \ PublisherPolicy \ Default \ policy.2.[11 or 20].vistadb.provider__7e75aae290f30672

    Simply remove any reference to your unwanted versions. I deleted my exact keys before I wrote it down, so I can’t tell you what they were. Also, I guess you can just search the registry for the “bad” version of the VistaDB.Provider.dll using just the version number. Again, in my case, it was 2.20.25.0

  • Comments Off
  • Friday
    Sep 8,2006

    I’ve downloaded this app from Code Project last night, and so I thought I would use it to make a post. Here’s a snippent of the what the app does.

    RSS Feeder.NET is a free open source desktop RSS feed aggregator which downloads feeds from web sources and stores them locally for offline viewing, searching and processing. It is also a rich blogging tool which you can use to blog a variety of blog engines including WordPress, B2Evolution, .Text, Community Server etc. You can be fully MS Outlook® dependent or can run fully standalone. You can also use both at the same time whichever you find comfortable to work with. It does not increase the Outlook load time, nor does it make the Outlook slow or prevent it from closing properly. It is a Smart Client that makes best use of both Local Resource and Distributed Web Information sources.

    I’m building a smart client of my own, and I hope this will be a decent example to follow. I am still going with the Compsite UI Application Block (CAB), so we’ll see if I can integrate what I learn from RSS Feeder.NET and what I have been doing with CAB for the last six months.

    Also, I will look to improve this app so that I can use it to post to SurplusMeat without having to use a web browser. A very good feature set has already been implemented, but I think I have a few more ideas on how to improve it (spell check, live preview, post to multiple blogs).

     

  • Comments Off