Hide

SftPrintPreview/OCX 1.0 - ActiveX Print Preview Control

Display
Print

SftPrintPreview.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 X As OLE_XPOS_PIXELS, ByVal Y As OLE_YPOS_PIXELS)
C#.NETvoid object_ContextMenuEvent(object sender, EventArgumentType e);
VC++void OnContextMenuobject(short Button, short Shift, OLE_XPOS_PIXELS X, OLE_YPOS_PIXELS Y);
CHRESULT OnContextMenuobject(short Button, short Shift, OLE_XPOS_PIXELS X, OLE_YPOS_PIXELS Y);

object

A SftPrintPreview object.

Button

The button that is pressed during the event (see SftControlButtonConstants). 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. Only one of the bits is set, indicating the button that caused the event.

ButtonValueDescription
constSftControlLeftButton1The left mouse button was pressed.
constSftControlRightButton2The right mouse button was pressed.
constSftControlMiddleButton4The middle mouse button was pressed.

Shift

The state of the SHIFT, CONTROL and ALT keys during the event (see SftControlKeyConstants). 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. The Shift variable indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed.

ShiftValueDescription
constSftControlShiftMask1The SHIFT key was pressed.
constSftControlCtrlMask2The CONTROL key was pressed.
constSftControlAltMask4The ALT key was pressed.

x

The x coordinate of the mouse cursor when the button was pressed. If x and y are -1, the user pressed Shift-F10.

y

The y coordinate of the mouse cursor when the button was pressed. If x and y are -1, the user pressed Shift-F10.

Comments

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

An application can display a context menu in response to this event. Before displaying the popup menu, the CancelMode method must be called.

See Also SftPrintPreview Object | Object Hierarchy


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