DisableMenuItems
This property returns or sets the disable state of the context menu.
Property get
HRESULT get_DisableMenuItems([out, retval] long *pVal);
Parameters
pVal
[out, retval] pointer to a long variable that receives the actual disable state of the context menu. The disable state is represented by or junction of the enum type TCEVENTVIEW_CONTEXTMENUFLAGS.
Return Values
S_OK Function was successfully called E_POINTER pVal was no valid pointer
|
Property set
HRESULT put_DisableMenuItems([in] long newVal);
Parameters
newVal
[in] a long variable set holds the new disable state of the context. The disable state is represented by or junction of the enum type TCEVENTVIEW_CONTEXTMENUFLAGS.
Return Values S_OK Function was successfully called |
Visual Basic sample code
Option Explicit
' add the Beckhoff TcEvent View Library to the components
' place a TcEventView on the form, and assign the name TcEventView1
Private Sub Form_Load()
Dim state As Long
' get the actual context menu state
state = TcEventView1.DisableMenuItems
' disable the confirm menu item of the context menu
state = state Or TCEVENTVIEW_DISABLECONFIRM
TcEventView1.DisableMenuItems = state
End Sub