当前位置:首页 > 开发 > C# > 正文内容

C# 获取文件图标

C#4年前 (2022-10-23)
string file = @"C:\Windows\explorer.exe";
pictureBox1.Image = System.Drawing.Icon.ExtractAssociatedIcon(file).ToBitmap();


转载请注明出处。

本文链接:http://pythonopen.com/?id=223

相关文章

C# 获取屏幕高宽度

方式1-不包含任务栏高度    var primaryScr...

C# System.IO.Path

System.IO.Path.GetExtension返回指定的路径字符串的扩展名。string&n...

C# OnMeasureItem

1. **整体功能概述**   - `OnMeasureItem` 是一个在Wi...

c# Invalidate、Refresh、Refreshitem、Refreshitems的功能

Invalidate方法功能概述Invalidate方法主要用于使控件的特定区域(整个控件或部分区域...

C# ref 和out

ref关键字概念:ref是 C# 中的一个关键字,用于按引用传递参数。当在方法调用中使用ref关键字...

C# Byte[]转为Bitmap

在 C# 中,可以使用System.Drawing命名空间下的相关类将byte[]类型的数据转换为B...