So, hoping it's not redundant and for all intents and purposes.
Note: Closing the PB application closes all open "File Properties" dialogs.
Tested on PB 6.12 x64 - Win10 x64
Code: Select all
EnableExplicit
;
Procedure   ShowFileProperties(filename.s)
  Protected.SHELLEXECUTEINFO SHEX
  
  With SHEX
    \cbSize = SizeOf(SHELLEXECUTEINFO)
    \fMask = #SEE_MASK_INVOKEIDLIST
    \hwnd = 0
    \lpVerb = @"properties"
    \lpFile = @fileName
    \lpParameters = 0
    \lpDirectory = 0
    \nShow = #SW_SHOWNORMAL
    \hInstApp = 0
    \lpIDList = 0
    \lpClass = 0
    \hkeyClass = 0
    \dwHotKey = 0
    \hIcon = 0
    \hProcess = 0
  EndWith
    
  If ShellExecuteEx_(@SHEX) = 0
    MessageRequester("File properties","Error "+Str(GetLastError_()) + Chr(10) + "Unable to open file properties")
  EndIf
EndProcedure
;
Define.l Event
If OpenWindow(0, 0, 0, 222, 70, "File properties", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) 
  ButtonGadget(0, 10,  10, 200, 20, "File #1 properties")
  ButtonGadget(1, 10,  40, 200, 20, "File #2 properties")
  Repeat 
    Event=WaitWindowEvent()
    Select Event
      Case #PB_Event_CloseWindow : Break
      Case #PB_Event_Gadget
        Select EventGadget()
          Case 0 : ShowFileProperties(#PB_Compiler_Home+"Examples\Sources\Data\PureBasic.bmp")
          Case 1 : ShowFileProperties(#PB_Compiler_Home+"Examples\Sources\Data\PureBasicLogo.bmp")
        EndSelect
    EndSelect
  ForEver
EndIf




