daved
New Member
Posts: 24
|
Post by daved on Nov 14, 2021 11:10:18 GMT -5
I would like to display the Properties dialog that you get using the Right-Mouse-Button pop-up menu "Properties" item on a selected path/filename. Is there an API call to use?
|
|
|
Post by Walt Decker on Nov 14, 2021 11:30:20 GMT -5
Do you mean from a desktop link?
|
|
daved
New Member
Posts: 24
|
Post by daved on Nov 14, 2021 12:50:29 GMT -5
Not from a desktop link. From within a Liberty Basic program. I'd like to select a filename in a GUI -- That's not a problem. Then I'd like a button that displays the Properties dialog, as if I clicked "Properties" from the desktop pop-up menu.
|
|
|
Post by Walt Decker on Nov 14, 2021 13:11:11 GMT -5
So, you want file properties, e. g. file size, last time accessed, last time modified, archive status, etc.
You would have to roll your own. That can be done by getting the info from LB's file statement and plugging that data into your own form.
|
|
|
Post by Chris Iverson on Nov 14, 2021 15:18:30 GMT -5
If you purely want to show only the Shell's property sheet, and don't need to take any information or user input from it, then you can actually ask the shell to open the property sheet for a specific file, using ShellExecuteExA.
file$ = StartupDir$ + "run451.exe" print ShowFileProperties(file$)
Function ShowFileProperties(filePath$) struct ShExInfo, cbSize as ulong, fMask as ulong, hWnd as ulong, verb$ as ptr, file$ as ptr, param$ as ptr,_ directory$ as ptr, nShow as long, hInstApp as ulong, IDList as ulong, class$ as ptr, hkeyClass as ulong,_ dwHotKey as ulong, hIcon as ulong, hProcess as ulong
ShExInfo.cbSize.struct = len(ShExInfo.struct) ShExInfo.fMask.struct = hexdec("C") 'SEE_MASK_INVOKEIDLIST ShExInfo.verb$.struct = "properties" ShExInfo.nShow.struct = _SW_SHOW
ShExInfo.file$.struct = filePath$
CallDLL #shell32, "ShellExecuteExA",_ ShExInfo as struct,_ ShowFileProperties as long End Function
|
|
daved
New Member
Posts: 24
|
Post by daved on Nov 14, 2021 23:24:26 GMT -5
Chris Iverson -- Your code works fine- Thank You! If I replace "run451.exe" with a path to a file, it displays the files Property sheet, which is exactly what I want. Much appreciated.
|
|