event RClick (ID as Long)
Fired when an item has been clicked using the right mouse button.

TypeDescription
ID as Long A long expression that specifies the item's identifier being right clicked.

Use the RClick event to notify your application that an item was right clicked. Use the Click event to notify your application when user clicks an item. Use the Item property to retrieve the item giving its identifier. Use the Select event to notify you application that the user selects an item. Use the Caption property to specify the caption of the item.

Syntax for RClick event, /NET version, on:

private void RClick(object sender,int ID)
{
}

Private Sub RClick(ByVal sender As System.Object,ByVal ID As Integer) Handles RClick
End Sub

Syntax for RClick event, /COM version, on:

private void RClick(object sender, AxEXMENULib._IMenuEvents_RClickEvent e)
{
}

void OnRClick(long ID)
{
}

void __fastcall RClick(TObject *Sender,long ID)
{
}

procedure RClick(ASender: TObject; ID : Integer);
begin
end;

procedure RClick(sender: System.Object; e: AxEXMENULib._IMenuEvents_RClickEvent);
begin
end;

begin event RClick(long ID)
end event RClick

Private Sub RClick(ByVal sender As System.Object, ByVal e As AxEXMENULib._IMenuEvents_RClickEvent) Handles RClick
End Sub

Private Sub RClick(ByVal ID As Long)
End Sub

Private Sub RClick(ByVal ID As Long)
End Sub

LPARAMETERS ID

PROCEDURE OnRClick(oExMenu,ID)
RETURN

Syntax for RClick event, /COM version (others), on:

<SCRIPT EVENT="RClick(ID)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function RClick(ID)
End Function
</SCRIPT>

Procedure OnComRClick Integer llID
	Forward Send OnComRClick llID
End_Procedure

METHOD OCX_RClick(ID) CLASS MainDialog
RETURN NIL

void onEvent_RClick(int _ID)
{
}

function RClick as v (ID as N)
end function

function nativeObject_RClick(ID)
return

The following VB sample displays the caption of the item being right clicked:

Private Sub ExMenu1_RClick(ByVal ID As Long)
    Debug.Print ExMenu1.Item(ID).Caption
End Sub

The following C++ sample displays the caption of the item being right clicked:

#include "Item.h"
void OnRClickExmenu1(long ID) 
{
	OutputDebugString( m_menu.GetItem( COleVariant(ID) ).GetCaption() );
}

The following VB.NET sample displays the caption of the item being right clicked:

Private Sub AxExMenu1_RClick(ByVal sender As Object, ByVal e As AxEXMENULib._IMenuEvents_RClickEvent) Handles AxExMenu1.RClick
    Debug.WriteLine(AxExMenu1.item(e.iD).Caption)
End Sub

The following C# sample displays the caption of the item being right clicked:

private void axExMenu1_RClick(object sender, AxEXMENULib._IMenuEvents_RClickEvent e)
{
	System.Diagnostics.Debug.WriteLine(axExMenu1[e.iD].Caption);
}

The following VFP sample displays the caption of the item being right clicked:

*** ActiveX Control Event ***
LPARAMETERS id

with thisform.ExMenu1
	wait window nowait .Item(id).Caption
endwith