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 |
文章作者
Nuclear'Atk
上次更新
2011-08-08
许可协议
Nuclear'Atk(核攻击)网络安全实验室版权所有,转载请注明出处。