ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellBrowser.TShellBrowser.GetShellObjectName

Gets the well formatted shell name of the current object.

Syntax
Pascal
function GetShellObjectName(pInFolderName: Boolean = True): string;
Parameters 
Description 
pInFolderName: Boolean = True 
If True, a name relative to the folder from which the request was made is returned. E.g. "username" instead of "username (on Machine)" for a particular user's folder.  

Returns the well formatted shell name for the current object.

GetShellObjectName returns a display friendly name of the current object, which you can for example see in the Windows Explorer or the common file open dialog. It depends on the Windows Explorer setting, if the return value includes the file extension. The property ObjectName holds the file system name of the current object. They often only differ in upper or lower case. Some shell names like 'This PC' depend on the language of the installed Windows.

Exceptions 
Description 
EInvalidOperation 
In case there is no current object.  
ObjectName               GetShellObjectName

'A:'                    '3,5"-Disk (A:)'
'CALC.EXE'               'Calc.exe'
''                       'This PC'