Código:'ShellExecuteEX API Private Declare Function ShellExecuteEX Lib "shell32.dll" Alias "ShellExecuteEx" _ (tSEI As ShellExecuteInfo) As Long 'ShellExecuteInfo Type Private 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 Const SEE_MASK_INVOKEIDLIST = &HC Const SEE_MASK_NOCLOSEPROCESS = &H40 Const SEE_MASK_FLAG_NO_UI = &H400 Function Show_File_Properties(sFileName As String, lhWnd As Long) As Long Dim tSEI As ShellExecuteInfo With tSEI .hwnd = lhWnd .lpVerb = "Properties" .lpFile = sFileName .lpParameters = vbNullChar .lpDirectory = vbNullChar .nShow = 0 .hInstApp = 0 .lpIDList = 0 .cbSize = Len(tSEI) .fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_INVOKEIDLIST Or SEE_MASK_FLAG_NO_UI End With ShellExecuteEX tSEI Show_File_Properties = tSEI.hInstApp End Function
Lo anterior lo Agregas en un modul Bas y en tu formulario agregas un filelist
Código:Private Sub File1_DblClick() Dim lRet As Long lRet = Show_File_Properties(File1.FileName, App.hInstance) End Sub
Y con esto te aparece el cuadro de propiedades de archivo de windows
Edited by: Zitro