开启文件属性窗口
声明: TypeSHELLEXECUTEINFO cbSizeAsLong fMaskAsLong hwndAsLong lpVerbAsString lpFileAsString lpParametersAsString lpDirectoryAsString nShowAsLong hInstAppAsLong lpIDListAsLong lpClassAsString hkeyClassAsLong dwHotKeyAsLong hIconAsLong hP
声明:
TypeSHELLEXECUTEINFO
cbSizeAsLong
fMaskAsLong
hwndAsLong
lpVerbAsString
lpFileAsString
lpParametersAsString
lpDirectoryAsString
nShowAsLong
hInstAppAsLong
lpIDListAsLong
lpClassAsString
hkeyClassAsLong
dwHotKeyAsLong
hIconAsLong
hProcessAsLong
EndType
PublicConstSEE_MASK_INVOKEIDLIST=&HC
PublicConstSEE_MASK_NOCLOSEPROCESS=&H40
PublicConstSEE_MASK_FLAG_NO_UI=&H400
DeclareFunctionShellExecuteEXLib"shell32.dll"Alias"ShellExecuteEx"(SEIAsSHELLEXECUTEINFO)AsLong
代码:
'使用:ShowProps("c:command.com",Me.hWnd)
PublicSubShowProps(FileNameAsString,OwnerhWndAsLong)
DimSEIAsSHELLEXECUTEINFO
DimrAsLong
WithSEI
.cbSize=Len(SEI)
.fMask=SEE_MASK_NOCLOSEPROCESSOrSEE_MASK_INVOKEIDLISTOrSEE_MASK_FLAG_NO_UI
.hwnd=OwnerhWnd
.lpVerb="properties"
.lpFile=FileName
.lpParameters=vbNullChar
.lpDirectory=vbNullChar
.nShow=0
.hInstApp=0
.lpIDList=0
EndWith
r=ShellExecuteEX(SEI)
EndSub->
TypeSHELLEXECUTEINFO
cbSizeAsLong
fMaskAsLong
hwndAsLong
lpVerbAsString
lpFileAsString
lpParametersAsString
lpDirectoryAsString
nShowAsLong
hInstAppAsLong
lpIDListAsLong
lpClassAsString
hkeyClassAsLong
dwHotKeyAsLong
hIconAsLong
hProcessAsLong
EndType
PublicConstSEE_MASK_INVOKEIDLIST=&HC
PublicConstSEE_MASK_NOCLOSEPROCESS=&H40
PublicConstSEE_MASK_FLAG_NO_UI=&H400
DeclareFunctionShellExecuteEXLib"shell32.dll"Alias"ShellExecuteEx"(SEIAsSHELLEXECUTEINFO)AsLong
代码:
'使用:ShowProps("c:command.com",Me.hWnd)
PublicSubShowProps(FileNameAsString,OwnerhWndAsLong)
DimSEIAsSHELLEXECUTEINFO
DimrAsLong
WithSEI
.cbSize=Len(SEI)
.fMask=SEE_MASK_NOCLOSEPROCESSOrSEE_MASK_INVOKEIDLISTOrSEE_MASK_FLAG_NO_UI
.hwnd=OwnerhWnd
.lpVerb="properties"
.lpFile=FileName
.lpParameters=vbNullChar
.lpDirectory=vbNullChar
.nShow=0
.hInstApp=0
.lpIDList=0
EndWith
r=ShellExecuteEX(SEI)
EndSub->
- 上一篇:移动文件到回收站
- 下一篇:用VB打造自己的SQL连接器
精彩图集
精彩文章