Category: WinForms

An Open Source Website Screen Capture Program

An Open Source Website Screen Capture Program

March 14, 2009 | By | 3 Comments

A few weeks ago I posted Taking Thumbnails of a Website, that shows how to take a screen shot of a website using the Web Browser control. I used the code from the post to develop SiteCapture as an open source application.

Continue Reading

Displaying Gravatars Using C#

Displaying Gravatars Using C#

March 2, 2009 | By | 5 Comments

Gravatar is a popular avatar service that links email addresses to the avatar. You do not need to register an account to be able to display gravatars on your site. All you need to do is construct the URL of the image using the user’s email.

Continue Reading

Using the Phidgets LCD With Outlook

Using the Phidgets LCD With Outlook

February 26, 2009 | By | 1 Comment

When I got my Phidgets StarterKit I decided to use the LCD that came with it with the Outlook Addin I developed for my previous post Capturing Outlook 2007’s New Mail and Reminder Events. The LCD connects to the PC through USB. It has no memory, so the control program runs on the PC. The […]

Continue Reading

Get a Movie’s Details From IMDb

Get a Movie’s Details From IMDb

February 23, 2009 | By | 8 Comments

A while back when I was developing MoviePlay (a movies database) I wanted to allow the user to get the movie’s details from IMDb (The Internet Movie Database) instead of having him/her enter it manually. IMDb does not provide a way for developers to use their data, so I wrote the code below to screen […]

Continue Reading

Taking Thumbnails of a Website

Taking Thumbnails of a Website

February 19, 2009 | By | 7 Comments

I always wondered how web directories take thumbnail snapshots of my blog when I register with them. And yesterday I had some free time to find out how it could be done in C#. I used the WebBrowser control to achieve this. Here is how I did it.

Continue Reading

Starting and Stopping the ScreenSaver

February 13, 2009 | By | Add a Comment

Starting and stopping the screensaver in C# can be done by calling the Windows API’s PostMessage function, which posts a message to the Windows Message Queue asynchronously. Starting it is straight forward. But stopping it is somewhat tricky. I accomplished this here by stopping the window on the foreground which will always be the screensaver […]

Continue Reading

Dictionaries of HTML Codes

Dictionaries of HTML Codes

February 11, 2009 | By | Add a Comment

I wrote this class to help me do some screen scraping programs. It has two Dictionary objects. One contains the HTML codes and their text equivalents and the other contains the numeric HTML codes and their text equivalents.

Continue Reading

Capturing Outlook 2007’s New Mail and Reminder Events

February 3, 2009 | By | 2 Comments

Visual Studio 2008’s Outlook Add-in projects allows you to create add-ins that can customize almost any feature of Ms Outlook. Two useful events that can be captured are ReminderFire and NewMailEx. The first occurs before a reminder of a calendar item is executed. And the second occurs when a new email is received in the […]

Continue Reading

Reading Excel 2003 and 2007 Files Using OLEDB

Reading Excel 2003 and 2007 Files Using OLEDB

January 30, 2009 | By | 45 Comments

One of the feature of the application I’m working on these days is allowing the user to import data from Excel 2003 and 2007 files. After some research I found out that OLEDB is the only way to read both Excel formats without any problems.

Continue Reading

Lock, Sleep or Hibernate Windows using C#

January 28, 2009 | By | 7 Comments

I don’t think there is a Windows developer who has not done this with his or her favorite programming language. So here is the C# version. Putting Windows in Sleep or Hibernate mode can be done with one line of code using the Windows.Forms.Application object’s SetSuspendState method, and locking can be done using Win32’s LockWorkStation […]

Continue Reading