Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / desktop / WinForms

Zeta Twitpic

5.00/5 (11 votes)
19 Feb 2010CPOL2 min read 30.8K   810  
Small tool to monitor the clipboard for images and upload them to Twitpic

Introduction

This article introduces a small tool that sits in your system tray as an icon and monitors the clipboard for images.

If an image is detected, the application pops up and allows you to upload the picture to twitpic.com with your Twitter credentials and post the URL to Twitter. In addition the URL of the uploaded image is being copied to your clipboard, so that you can easily e.g. send the URL by e-mail or use otherwise.

If you don't know Twitter, you may look at their website Twitter.com or read the Wikipedia article about Twitter.

Background

I got the idea to write this tool from the need to sometimes put screenshots to Twitter/Twitpic.

The usual process was to copy an image to the clipboard, fire up Paint.NET, paste the image into Paint.NET, save the image to a file, then go to the Twitpic website, upload my image and post the URL to Twitter.

This requires too many steps in my opinion, so I created this tiny little application in a few hours on a boring Saturday morning.

Technical Implementation

Since it is rather easy to use the Twitpic API, the tool contains rather few sophisticated code, too.

Basically it is just a small Windows Forms application that contains a clipboard chain viewer and a method to HTTP-post an image to an URL. That's really all.

The clipboard viewer was inspired by this article, the Twitpic upload code was taken and adjusted from this posting.

Image: Zeta Twitpic while uploading an image to the Twitpic servers.

Current State of the Tool

The Zeta Twitpic tool was a quickly assembled tool that perfectly fit my needs. Probably it does not fit yours completely.

Therefore you have at least two options:

  1. Download the source code and enhance it the way you want it.
  2. Tell me (down here in the comments section) which features are missing that I should add.

Of course option 2 would be helpful to me when enhancing.

As usual, I will enhance, extend and correct the tool over the next weeks and months. Keep the feedback coming!

History

  • 2010-02-20 Uploaded first version to CodeProject.com

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)