Hide

SftOptions 1.0 - ActiveX Options Control

Display
Print

SftOptions.ContextMenu Event

The right mouse button is released or Shift-F10 is pressed requesting a context menu.

Syntax

VB.NETPrivate Sub object_ContextMenuEvent(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.ContextMenuEvent
VBPrivate Sub object_ContextMenu(ByVal Button As Integer, ByVal Shift As Integer, ByVal Name As String, ByVal xPos As OLE_XPOS_PIXELS, ByVal yPos As OLE_YPOS_PIXELS)
C#.NETvoid object_ContextMenuEvent(object sender, EventArgumentType e);
VC++void OnContextMenuobject(short Button, short Shift, _bstr_t Name, OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos);
CHRESULT OnContextMenuobject(short Button, short Shift, BSTR Name, OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos);

object

A SftOptions object.

Button

Describes the button(s) that are pressed. The Button argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event.

ButtonValueDescription
constSftOptionsLeftButton1The left mouse button was pressed.
constSftOptionsRightButton2The middle mouse button was pressed.
constSftOptionsMiddleButton4The right mouse button was pressed.

Shift

Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The Shift argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed.

ShiftValueDescription
constSftOptionsShiftMask1The SHIFT key is down.
constSftOptionsCtrlMask2The CONTROL key is down.
constSftOptionsAltMask4The ALT key is down.

Name

The name of the entry for which a context menu is requested. If a context menu for the header is requested, "Header" is passed. If a context menu is requested on the empty area at the end of the list, "Empty Area" is passed.

xPos

The x coordinate of the mouse cursor. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

yPos

The y coordinate of the mouse cursor. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

Comments

The ContextMenu event occurs when the right mouse button is released or Shift-F10 is pressed requesting a context menu.

If a context menu is requested using Shift-F10, both xPos and yPos are set to -1.

Visual C++ and MFC: When using C++/MFC, a special FixHelp function must be called for proper functioning of the Windows WM_HELP message, which is otherwise suppressed by MFC, preventing the HelpRequested event from occurring. Please see the included sample code for more information.

See Also SftOptions Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.