SftDirectory 2.5

SftDirectory.ContextMenu Method

Softel vdm, Inc.

Displays the context menu for the selected file/folder(s).

Syntax       

VB.NET

object.ContextMenu(ByVal xPos As OLE_XPOS_PIXELS, ByVal yPos As OLE_YPOS_PIXELS, ByVal ExtendedVerbs As Boolean)
object.ContextMenuEvent(ByVal xPos As OLE_XPOS_PIXELS, ByVal yPos As OLE_YPOS_PIXELS, ByVal ExtendedVerbs As Boolean)

VB

object.ContextMenu(ByVal xPos As OLE_XPOS_PIXELS, ByVal yPos As OLE_YPOS_PIXELS, ByVal ExtendedVerbs As Boolean)

C#.NET

void object.ContextMenu(OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos, bool ExtendedVerbs);
void object.ContextMenuEvent(OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos, bool ExtendedVerbs);

VC++

HRESULT object->ContextMenu(OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos, VARIANT_BOOL ExtendedVerbs);

C

HRESULT object->raw_ContextMenu(OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos, VARIANT_BOOL ExtendedVerbs);

Delphi

procedure object.ContextMenu(xPos : Integer, yPos : Integer, ExtendedVerbs : WordBool);

object

A SftDirectory object.

xPos

The x screen coordinate in pixels where the top, left corner of context menu is to be located.

yPos

The y screen coordinate in pixels where the top, left corner of context menu is to be located.

ExtendedVerbs

Defines whether extended verbs should be accessible if available. 

ExtendedVerbs

Description

True

Extended verbs are added to the context menu, if available.

False

No extended verbs are added to the context menu.

Comments

The ContextMenu method displays the context menu for the selected file/folder(s).

The context menu is not implemented by SftDirectory.  The context menu and its contents are created and managed by the Windows Shell and available Shell extensions. 

If multiple folders are selected, the selections are normalized first.  The process of normalizing selections involves creating a group of folders owned by the same immediate parent folder.  While it is possible to select any combination of folders, the Windows Shell can only create a context menu for a group of folders owned by one folder.

Extended verbs are displayed by Windows Explorer, if the user right-clicks while pressing the Shift key.  Not all folders offer extended verbs.  An example of an extended command under Windows XP is the "Pin to Start Menu", which is available for (non-executable) files.

Depending on the RenameStyle property settings, the Rename menu entry may be available.

The ShowingContextMenu event occurs when the context menu is about to be shown.

The Folder.ContextMenu method can be used to display the context menu for one folder.


Feedback / comments / error reports for this topic
© 2003, 2008 - Softel vdm, Inc. - www.softelvdm.com