C# file association icon




















Many files have embedded icons that provide a visual representation of the associated file type. For example, Microsoft Word documents contain an icon that identifies them as Word documents. When displaying files in a list control or table control, you may want to display the icon representing the file type next to each file name.

You can do this easily by using the ExtractAssociatedIcon method. The following code example demonstrates how to extract the icon associated with a file and display the file name and its associated icon in a ListView control. Paste the preceding code into a Windows Form, and call the ExtractAssociatedIconExample method from the form's constructor or Load event-handling method.

Privacy policy. The Icon property for a project specifies the icon file. The Icon property can be accessed in the Application pane of the Project Designer ; it contains a list of icons that have been added to a project either as resources or as content files. After you set the icon property for an application, you might also set the Icon property of each Window or Form in the application. In Solution Explorer , choose a project node not the Solution node.

Visual Basic —In the Icon list, choose an icon. Thanks Adhal. Follow Post Reply. Finally worked it out. This discussion thread is closed Start new discussion. Similar topics PHP. Upgraded php, lost php file association. NET Framework. File association - Problem with argument begin passed in. Compileing to diffrent file extensions. ListView with file extension icons. How to execute a.



0コメント

  • 1000 / 1000