今天就跟大家聊聊有關(guān)vbs中怎么利用Shell.Application獲取圖片分辨率,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結(jié)了以下內(nèi)容,希望大家根據(jù)這篇文章可以有所收獲。
代碼如下:
Path = "C:\test.jpg" arr = Split(Path,"\") FileName = arr(Ubound(arr)) FolderPath = Left(Path, Len(Path) - Len(FileName) - 1) Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(FolderPath) set objFolderItem = objFolder.ParseName(FileName) Width = objFolder.GetDetailsOf(objFolderItem, 162) Height = objFolder.GetDetailsOf(objFolderItem, 164) Msgbox "Width: " & Width & " Height: " & Height
看完上述內(nèi)容,你們對vbs中怎么利用Shell.Application獲取圖片分辨率有進一步的了解嗎?如果還想了解更多知識或者相關(guān)內(nèi)容,請關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝大家的支持。