在windows窗体apllication中显示数据网格中文件名的文件类型图标 [英] Show icon of file type with file name in data grid in windows form apllication

查看:82
本文介绍了在windows窗体apllication中显示数据网格中文件名的文件类型图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我很久以后回来了......我指望代码团队,我需要上传各种格式的文件,如.jpg。 png,.pdf,.doc等。插入文件后,我需要在文件图标及其名称的数据网格中显示该文件的详细信息,并查看链接按钮以打开此文件...请帮帮我。



我相信你们......一定会帮助我。



我是什么尝试过:



我完全糊涂了......怎么弄这个....即使在Windows中这样做也很复杂应用。请帮我。我不是程序员....我只是学习者。

解决方案

参见这篇文章:在C#中获取已注册的文件类型及其相关图标 [ ^ ]



你也可以使用:

 Icon.ExtractAssociatedIcon(file.FullName); 



完整的示例可以在这里找到:如何:提取与文件关联的图标在Windows窗体中 [ ^ ]


Dear All,

I am back after long time here..I count on code team, I need to upload file of various format like .jpg,.png,.pdf,.doc etc. After inserting file, I need to show details of that file in data grid having icon of file with its name, and view link button to open this file...Please help me out.

I believe you guys....Will sure help Me.

What I have tried:

I am totally confused...how to get this....even it is very complicated for me to do so in Windows application. Please help me. I am not programmer....I am just learner.

解决方案

See this article: Get Registered File Types and Their Associated Icons in C#[^]

You can also use:

Icon.ExtractAssociatedIcon(file.FullName);


The full example can be found here: How to: Extract the Icon Associated with a File in Windows Forms[^]


这篇关于在windows窗体apllication中显示数据网格中文件名的文件类型图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆