Results 1 to 2 of 2

Thread: file property

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2001
    Location
    RSM
    Posts
    46

    Question file property

    How can I see a selected file property window??


    thx

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    VB Code:
    1. Private Type SHELLEXECUTEINFO
    2.     cbSize        As Long
    3.     fMask         As Long
    4.     hwnd          As Long
    5.     lpVerb        As String
    6.     lpFile        As String
    7.     lpParameters  As String
    8.     lpDirectory   As String
    9.     nShow         As Long
    10.     hInstApp      As Long
    11.     lpIDList      As Long     'Optional parameter
    12.     lpClass       As String   'Optional parameter
    13.     hkeyClass     As Long     'Optional parameter
    14.     dwHotKey      As Long     'Optional parameter
    15.     hIcon         As Long     'Optional parameter
    16.     hProcess      As Long     'Optional parameter
    17. End Type
    18.  
    19. Private Const SEE_MASK_INVOKEIDLIST = &HC
    20. Private Const SEE_MASK_NOCLOSEPROCESS = &H40
    21. Private Const SEE_MASK_FLAG_NO_UI = &H400
    22.  
    23. Private Declare Function ShellExecuteEx Lib "shell32.dll" (SEI As SHELLEXECUTEINFO) As Long
    24.  
    25. Private Sub ShowProperties(filename As String, OwnerhWnd As Long)
    26.  
    27.   'open a file properties property page for
    28.   'specified file if return value
    29.  
    30.    Dim SEI As SHELLEXECUTEINFO
    31.  
    32.   'Fill in the SHELLEXECUTEINFO structure
    33.    With SEI
    34.       .cbSize = Len(SEI)
    35.       .fMask = SEE_MASK_NOCLOSEPROCESS Or _
    36.                SEE_MASK_INVOKEIDLIST Or _
    37.                SEE_MASK_FLAG_NO_UI
    38.       .hwnd = OwnerhWnd
    39.       .lpVerb = "properties"
    40.       .lpFile = filename
    41.       .lpParameters = vbNullChar
    42.       .lpDirectory = vbNullChar
    43.       .nShow = 0
    44.       .hInstApp = 0
    45.       .lpIDList = 0
    46.    End With
    47.  
    48.   'call the API to display the property sheet
    49.    Call ShellExecuteEx(SEI)
    50.  
    51. End Sub
    52.  
    53. 'Usage:   Place the full path and file name in the text box
    54. Private Sub Command1_Click()
    55. Call ShowProperties((Text1.Text), Me.hwnd)
    56. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width