Windows Explorer Control

Hi Everyone,

I'm currently working on an application developing in C# using visual studio 2003. The UI for the application is custom drawn and, as a result, to keep consistency, a lot of the compenets are custom drawn as well.

The problem that I'm having is that I want to implement a Windows Explorer type component complete with thumbnail view. All my attempts so far are too slow as, for each image file, to get the thumbnail I have to open the images, generate the thumbnail and then present it. This becomes a problem when there are folders which contain a lot of large images 

I've had a look into Shell Programming and it appears that it is possible to access the Thumbs.db file to access file thumbnails but there is no way to create this file if it is missing which means that I'm back to my original slow implementation if its not present in a viewed folder.

Is there anyway to generate Thumbnails on the fly efficiently without either using the Image.GetThumbnailImage method or creating an Image object and drawing a loaded image onto it.

Alternatively does anyone know of a way that I can pull the functionality out of the explorer component and shoe-horn it into my own application and give it my own look and feel.

Cheers

Toby


Answer this question

Windows Explorer Control

  • JustBitsNBytes

    I don't think there's an out-of-the box explorer control in WinForms.  But you can

    1. Try updating the thumbnails asynchronously (from a different thread) - that way, you can get a fast UI response.
    2. Cache your thumbnails, so the next time you visit the same folder, it comes up faster.

  • Mario Chenier - Microsoft

    Thanks for the suggestions. This was what I suspected (and feared!). I did consider writing my own caching mechanism but it seems so frustrating to have to re-implement something that is sitting right in front of me but Windows won't let me fully use. I may try and implement a seperate thread that loads the thumbs asynchronously but I suspect that a brief effort-reward analysis is going to leave me having to use the standard Visual Studio control.

    Thanks anyway,

    Toby

  • Windows Explorer Control