Board index » delphi » Property page/sheet help

Property page/sheet help

How do you programmatically display a file's general property
page/sheet?  In Explorer you can do it manually by right mouse clicking
on the selected file and then clicking Properties.
 

Re:Property page/sheet help


Thanks for the info.  I've always used ShellExecute in the past to avoid the
added complexity of ShellExecuteEx (i.e. SHELLEXECUTEINFO) so I didn't know it
could be used that way.  Thanks again.
Quote
Nic Roche wrote:
> Edward J. Stembler wrote in message <36368642.DDD52...@tampabay.rr.com>...
> >How do you programmatically display a file's general property
> >page/sheet?  In Explorer you can do it manually by right mouse clicking
> >on the selected file and then clicking Properties.

> Check out SHELLEXECUTEINFO in ShellExecuteEx

> I found this on the MSDN library (its in C and I haven't had need for it
> yet)

> You can invoke the shell's file Properties dialog box for a file with the
> ShellExecuteEx API. In the SHELLEXECUTEINFO structure, set the
> SEE_MASK_INVOKEIDLIST flag and the "properties" verb as follows:

>    SHELLEXECUTEINFO sei;

>    ZeroMemory(&sei,sizeof(sei));
>    sei.cbSize = sizeof(sei);
>    sei.lpFile = szPathOfFileToLaunchPropertiesOf;
>    sei.lpVerb = "properties";
>    sei.fMask  = SEE_MASK_INVOKEIDLIST;
>    ShellExecuteEx(&sei);

> MORE INFORMATION
> The SEE_MASK_INVOKEIDLIST mask enables ShellExecuteEx to invoke dynamic
> verbs added by context menu extensions, as well as verbs statically added in
> the registry under the file class' shell key

> Nic.

Re:Property page/sheet help


Quote
Edward J. Stembler wrote in message <36368642.DDD52...@tampabay.rr.com>...
>How do you programmatically display a file's general property
>page/sheet?  In Explorer you can do it manually by right mouse clicking
>on the selected file and then clicking Properties.

Check out SHELLEXECUTEINFO in ShellExecuteEx

I found this on the MSDN library (its in C and I haven't had need for it
yet)

You can invoke the shell's file Properties dialog box for a file with the
ShellExecuteEx API. In the SHELLEXECUTEINFO structure, set the
SEE_MASK_INVOKEIDLIST flag and the "properties" verb as follows:

   SHELLEXECUTEINFO sei;

   ZeroMemory(&sei,sizeof(sei));
   sei.cbSize = sizeof(sei);
   sei.lpFile = szPathOfFileToLaunchPropertiesOf;
   sei.lpVerb = "properties";
   sei.fMask  = SEE_MASK_INVOKEIDLIST;
   ShellExecuteEx(&sei);

MORE INFORMATION
The SEE_MASK_INVOKEIDLIST mask enables ShellExecuteEx to invoke dynamic
verbs added by context menu extensions, as well as verbs statically added in
the registry under the file class' shell key

Nic.

Other Threads