JCL Help:ShellOpenAs

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Invokes the shell's "Open With..." dialog for the specified file.


Pascal

 function ShellOpenAs(const FileName: string): Boolean;


Parameters

Parameters Description
const FileName: string The fully qualified name of the file for which to invoke the "Open With..." dialog. The caller is responsible for ensuring that the specified file actually exists, this function nor the shell does so. If the file does not exist the eventually invoke application, if any, is the one to determine that fact (and will likely display an error message).


Return Value

If the function succeeds it returns True, otherwise it returns False. Note that the invocation of the dialog is asynchronously so at the time the function returns the dialog likely is not on screen yet. The result therefore doesn't indicate whether or not the user selected an application but only whether or not the dialog can be shown in the first place.


Description

The ShellOpenAs function invokes the shell's "Open With..." dialog with the specified filename selected. This allows the user to select an application to open the file with, or dismiss opening all together. If the user selects an application and clicks the OK button the shell executes the selected application and instructs it to open the specified file.


About

Unit

JclShell


Donator

Petr Vones


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page