File Extensions: Finding the default Icon

Introduction

We are all familiar with the “explorer” style look and with the idea that it gives different icons to different file types. This is useful, because it lets us see at a glance what type of file we are looking at and it makes for a generally more user friendly environment.

But this also means that if we want to displays icons in our apps that represent files (like you would on a file sharing program or an FTP client), we will need to get those same icons and display them in (for example) a picture box. In this example I hope to show you how to do this. I'll give you the fully written out code at the end to save you having to piece lots of bits of code together.

You might also like...

Comments

About the author

Phil Couling United Kingdom

Software developer, working in Derby, England. Currently I'm mostly developing in C++ with a combination of Borland, Visual Studio and MinGW.

Much of my work at the moment is with Databa...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“To iterate is human, to recurse divine” - L. Peter Deutsch