Const SEE_MASK_INVOKEIDLIST = &HC Const SEE_MASK_NOCLOSEPROCESS = &H40 Const SEE_MASK_FLAG_NO_UI = &H400Declare Function ShellExecuteEX Lib "shell32.dll" Alias "ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As LongType 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 'Optional parameter lpClass As String 'Optional parameter hkeyClass As Long 'Optional parameter dwHotKey As Long 'Optional parameter hIcon As Long 'Optional parameter hProcess As Long 'Optional parameter End Type Public Function ShowProperties(filename As String, OwnerhWnd As Long) As Long ' 'open a file properties property page for specified file if return value ' '<=32 an error occurred ' 'From: Delphi code provided by "Ian Land" ([email protected]) Dim SEI As SHELLEXECUTEINFO Dim r As Long
' 'Fill in the SHELLEXECUTEINFO structure With SEI .cbSize = Len(SEI) .fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_INVOKEIDLIST Or SEE_MASK_FLAG_NO_UI .hwnd = OwnerhWnd .lpVerb = "properties" .lpFile = filename .lpParameters = vbNullChar .lpDirectory = vbNullChar .nShow = 0 .hInstApp = 0 .lpIDList = 0 End With ' 'call the API r = ShellExecuteEX(SEI)
' 'return the instance handle as a sign of success ShowProperties = SEI.hInstApp
End Function你试一下,肯定可以,要不,我将文件寄给你。 将100分给我,将qq号码给我。
Const SEE_MASK_NOCLOSEPROCESS = &H40
Const SEE_MASK_FLAG_NO_UI = &H400Declare Function ShellExecuteEX Lib "shell32.dll" Alias "ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As LongType 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 'Optional parameter
lpClass As String 'Optional parameter
hkeyClass As Long 'Optional parameter
dwHotKey As Long 'Optional parameter
hIcon As Long 'Optional parameter
hProcess As Long 'Optional parameter
End Type
Public Function ShowProperties(filename As String, OwnerhWnd As Long) As Long
' 'open a file properties property page for specified file if return value
' '<=32 an error occurred
' 'From: Delphi code provided by "Ian Land" ([email protected])
Dim SEI As SHELLEXECUTEINFO
Dim r As Long
' 'Fill in the SHELLEXECUTEINFO structure
With SEI
.cbSize = Len(SEI)
.fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_INVOKEIDLIST Or SEE_MASK_FLAG_NO_UI
.hwnd = OwnerhWnd
.lpVerb = "properties"
.lpFile = filename
.lpParameters = vbNullChar
.lpDirectory = vbNullChar
.nShow = 0
.hInstApp = 0
.lpIDList = 0
End With
' 'call the API
r = ShellExecuteEX(SEI)
' 'return the instance handle as a sign of success
ShowProperties = SEI.hInstApp
End Function你试一下,肯定可以,要不,我将文件寄给你。
将100分给我,将qq号码给我。