第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

獲取Shell使用的文件圖標(biāo)

獲取Shell使用的文件圖標(biāo)

FFIVE 2019-11-29 10:29:22
在.Net(C?;騐B:無關(guān))中,給定文件路徑字符串,F(xiàn)ileInfo結(jié)構(gòu)或FileSystemInfo結(jié)構(gòu)用于實際的現(xiàn)有文件,我如何確定外殼程序(瀏覽器)為此使用的圖標(biāo)文件?我目前不打算將其用于任何用途,但是當(dāng)看到這個問題時,我對如何做到這一點感到好奇,并且我認(rèn)為將其存檔在SO上將很有用。
查看完整描述

3 回答

?
慕妹3146593

TA貢獻(xiàn)1820條經(jīng)驗 獲得超9個贊

Imports System.Drawing

Module Module1


    Sub Main()    

        Dim filePath As String =  "C:\myfile.exe"  

        Dim TheIcon As Icon = IconFromFilePath(filePath)  


        If TheIcon IsNot Nothing Then    

            ''#Save it to disk, or do whatever you want with it.

            Using stream As New System.IO.FileStream("c:\myfile.ico", IO.FileMode.CreateNew)

                TheIcon.Save(stream)          

            End Using

        End If

    End Sub


    Public Function IconFromFilePath(filePath As String) As Icon

        Dim result As Icon = Nothing

        Try

            result = Icon.ExtractAssociatedIcon(filePath)

        Catch ''# swallow and return nothing. You could supply a default Icon here as well

        End Try

        Return result

    End Function

End Module


查看完整回答
反對 回復(fù) 2019-11-29
  • 3 回答
  • 0 關(guān)注
  • 691 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號