更新时间:2023-02-08 19:14:01
CodeProject has some classes you can download.
首先得到FileAssociationInfo,并从获得ProgramAssociationInfo。该PAI对象可以给你的图标。
First get the FileAssociationInfo, and from that get the ProgramAssociationInfo. The PAI object can give you the icon.
FileAssociationInfo fai = new FileAssociationInfo(".bob");
ProgramAssociationInfo pai = new ProgramAssociationInfo(fai.ProgID);
ProgramIcon icon = pai.DefaultIcon;