VB 打开、查看指定文件的属性窗口,打开文件属性面板

admin 2021年4月3日19:39:26评论55 views字数 985阅读3分17秒阅读模式

VB 打开、查看指定文件的属性窗口,打开文件属性面板:

Option Explicit

Private Const SW_SHOW = 5
Private Const SEE_MASK_INVOKEIDLIST = &HC
Private Type SHELLEXECUTEINFO
    cbSize    As Long
    fMask     As Long
    Hwnd      As Long
    lpVerb    As String
    lpFile    As String
    lpParameters As String
    lpDirectory As String
    nShow     As Long
    hInstApp  As Long
    lpIDList  As Long
    lpClass   As String
    hkeyClass As Long
    dwHotKey  As Long
    hIcon     As Long
    hProcess  As Long
End Type
Private Declare Function ShellExecuteEx Lib "shell32.dll" (ByRef s As SHELLEXECUTEINFO) As Long

Public Sub FileProperty(ByVal P As String)
    Dim shInfo As SHELLEXECUTEINFO
    With shInfo
        .cbSize = LenB(shInfo)
        .lpFile = P
        .nShow = SW_SHOW
        .fMask = SEE_MASK_INVOKEIDLIST
        .lpVerb = "properties"
    End With
    ShellExecuteEx shInfo
End Sub

Private Sub Form_Load()
    FileProperty "cmd.exe"
End Sub

文章来源于lcx.cc:VB 打开、查看指定文件的属性窗口,打开文件属性面板

相关推荐: 【VB】读取硬盘盘符及卷名(包括网络驱动器)

    读取/获取硬盘盘符及卷名(包括网络驱动器),VB 读取/获取硬盘盘符(包括网络驱动器),VB 读取/获取硬盘卷名(包括网络驱动器),VB 读取/获取网络驱动器盘符及卷名,VB 读取/获取网络驱动器盘符,VB 读取/获取网络驱动器卷名,VB 读取/获取硬…

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月3日19:39:26
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   VB 打开、查看指定文件的属性窗口,打开文件属性面板http://cn-sec.com/archives/324206.html

发表评论

匿名网友 填写信息