This blog has, IMO, some great resources. Unfortunately, some of those resources are becoming less relevant. I'm still blogging, learning tech and helping others...please find me at my new home on http://www.jameschambers.com/.

Wednesday, November 4, 2009

A Simple Image Display

In response to a forum thread on MSDN, I wrote a quick app that uses two quick methods to display a picture on a form.  The solution (Visual Studio 2008) is available for download here.  The class in question is System.Drawing.Graphics and the forum member was simply looking to display an image.

The app is pretty simple:

image

One method (Easy Open) loads an image from a file and sets the Image property of the PictureBox.  The other method (Harder Open) loads (and caches) and image to a member variable and keeps it around for a custom paint event on the PictureBox.

The poster also mentioned some performance metrics, so I stubbed out some placeholders for that as well.

No comments:

Post a Comment