How do I show thumbnail files from my application in Windows explorer?

Asked

Viewed 193 times

-1

I have an application that uses a file format of its own (for example, an extension . Xyz, being a format of my application).

I notice that when I have a PDF, the Explorer shows thumbnails, When I have videos and images, too. I would like to have the same functionality for the mentioned . Xyz files associated with my application.

What is the way to generate these thumbnails in order to make Windows display them? Is some specific API?

  • I sort the information, if you don’t like the edition, you can change, or even revert to its previous version by the history, available at http://answall.com/posts/157516/revisions

1 answer

3


Windows Explorer is responsible for displaying icons and thumbnails, and has several features that can be added by third-party applications. What you seek are...

Shell Extensions

As Shell Extensions, as the name says, can be implemented to add functionality in OS.

Basically they are implemented as COM interfaces, and the entry points are defined in the Windows API.

For C#, a starting point is this:
https://www.nuget.org/packages/SharpShell

Some examples of the features:

Thumbnails of files

Can be associated with certain extensions or CLSID, which is what you are searching for.

Miniatura

Preview Handlers

They would be a relevant complement to the thumbnails, since it will make the thumbnails of icons, it would be good to take advantage of the logic to show in the visualization panel of the window itself also:

Preview handler

Overlay icon

Synchronization programs with external storage, or applications like Tortoisegit, can display a small indicator on the application icon, to show if the file is synchronized, for example;

Overlay

Property Sheets

These are new pages in the file properties: have extensions for Windows that allow changing file dates, detection of streams NTFS alternatives, among others;

Property sheets

I won’t go into detail about the implementation itself, because it depends a lot on the language used.

As a complementary reading, there is a very interesting series in the Code Project, made for . NET, at this address (which is where the response images came from):

https://www.codeproject.com/Articles/563114/NET-Shell-Extensions-Shell-Thumbnail-Handlers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.