网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 vbs下用Shell.Application获取图片分辨率
范文
    简单Google了一下,未果,于是发邮件请教了一下,很快就有了回复。
    代码如下:
    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
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/19 10:44:34