How to build image viewer?

Hi,

I am trying to learn windows programming again, many years since now so I have forgot a lot. I want to build an imageviewer and need some advices on how to do it. Dont need a lot of code just an overview. I want to do it this in small steps so I can understand how everything works together. The first thing I want to do is to create a form which shows my thumbnails. When it is done I want to move on with other functions like showing a full image, categorising them and so on.

I have created a form and in it a floatlayoutpanel. Then I have a usercontrol consisting of a form with one thumbnail. I add usercontrols into the floatlayoutpanel so they organise well. Then if I click a thumbnail I will change border color inside the usercontrol. Is this a wise thing to build it this way

Another way I thought of is to paint all images myself positioning each thumbnail and not use usercontrols at all. Just have a form an paint everything in it. Then if I click on one thumbnail I will calculate which one that was clicked and paint a border or something.

Or is it other smart ways to do this

( I notice some flickering in my first example and I tried to turn on double buffering but no difference. I guess I have to add override some background painting. I havent tried the second way to do it)

- Terje




Answer this question

How to build image viewer?