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:
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