Search Tools Links Login

File Properties Dialog


Visual Basic 6, or VB Classic

Display a files property dialog box

Original Author: Russ Huebner

Code

'SHELL EXECUTE FUNCTION
Declare Function ShellExecuteEx& _
Lib "Shell32.dll" Alias "ShellExecuteExA" _
(ByRef lpExecInfo As SHELLEXECUTEINFO)
'Flag Needed
Const SEE_MASK_INVOKEIDLIST& = &HC
'SHELL EXECUTE STRUCT
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
'-------------------------------------------------'Procedure: ShowFileProperties(ByVal FileName$)
'Purpose: You can invoke the a files Property
'dialog box for a file with the
'ShellExecuteEx API.
'   In the SHELLEXECUTEINFO structure, set
'the SEE_MASK_INVOKEIDLIST flag and
'the "properties" verb as follows
'Input: ByVal FileName As String
'Output: File Properties Dialog Box
'-----------------------------------------------
Public Sub ShowFileProperties(ByVal FileNamePath)
Dim sei As SHELLEXECUTEINFO
sei.cbSize = Len(sei)
sei.lpFile = FileNamePath  
sei.lpVerb = "properties"  
sei.fMask = SEE_MASK_INVOKEIDLIST
ShellExecuteEx sei    
End Sub
'-------------------------------------------------

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 87 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.