VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



File Properties Dialog

by Russ Huebner (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

Display a files property dialog box

Rate File Properties Dialog

'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
'-------------------------------------------------

Download this snippet    Add to My Saved Code

File Properties Dialog Comments

No comments have been posted about File Properties Dialog. Why not be the first to post a comment about File Properties Dialog.

Post your comment

Subject:
Message:
0/1000 characters