event ExecuteContextMenu (Item as String, Position as Long)
Occurs when the user selects an user item from the control's context menu.

TypeDescription
Item as String A string expression that indicates the caption of the selected item.
Position as Long A long expression that indicates the identifier of the selected item. The [id=<value>] option specifies the identifier of the item in the control's context menu. 
The ExecuteContextMenu event notifies your application that the user selects a custom context menu item. Use the ContextMenuItems property to add custom items to the control's context menu. Use the AllowContextMenu property  to allow the control's context menu. The ExecuteContextMenu event is not fired if the user selects one of the default entries in the control's context menu such us: Undo, Copy, and so on. The Change event notifies your application when the control's Text is changed.

Syntax for ExecuteContextMenu event, /NET version, on:

private void ExecuteContextMenu(object sender,string Item,int Position)
{
}

Private Sub ExecuteContextMenu(ByVal sender As System.Object,ByVal Item As String,ByVal Position As Integer) Handles ExecuteContextMenu
End Sub

Syntax for ExecuteContextMenu event, /COM version, on:

private void ExecuteContextMenu(object sender, AxEXHTMLLib._IHTMLEvents_ExecuteContextMenuEvent e)
{
}

void OnExecuteContextMenu(LPCTSTR Item,long Position)
{
}

void __fastcall ExecuteContextMenu(TObject *Sender,BSTR Item,long Position)
{
}

procedure ExecuteContextMenu(ASender: TObject; Item : WideString;Position : Integer);
begin
end;

procedure ExecuteContextMenu(sender: System.Object; e: AxEXHTMLLib._IHTMLEvents_ExecuteContextMenuEvent);
begin
end;

begin event ExecuteContextMenu(string Item,long Position)
end event ExecuteContextMenu

Private Sub ExecuteContextMenu(ByVal sender As System.Object, ByVal e As AxEXHTMLLib._IHTMLEvents_ExecuteContextMenuEvent) Handles ExecuteContextMenu
End Sub

Private Sub ExecuteContextMenu(ByVal Item As String,ByVal Position As Long)
End Sub

Private Sub ExecuteContextMenu(ByVal Item As String,ByVal Position As Long)
End Sub

LPARAMETERS Item,Position

PROCEDURE OnExecuteContextMenu(oHTML,Item,Position)
RETURN

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

<SCRIPT EVENT="ExecuteContextMenu(Item,Position)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function ExecuteContextMenu(Item,Position)
End Function
</SCRIPT>

Procedure OnComExecuteContextMenu String llItem Integer llPosition
	Forward Send OnComExecuteContextMenu llItem llPosition
End_Procedure

METHOD OCX_ExecuteContextMenu(Item,Position) CLASS MainDialog
RETURN NIL

void onEvent_ExecuteContextMenu(str _Item,int _Position)
{
}

function ExecuteContextMenu as v (Item as C,Position as N)
end function

function nativeObject_ExecuteContextMenu(Item,Position)
return

How do I provide my own menu for my images (emotion icons)?

VBA (MS Access, Excell...)

' ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
Private Sub HTML1_ExecuteContextMenu(ByVal Item As String,ByVal Position As Long)
	With HTML1
		Debug.Print( Item )
		Debug.Print( Position )
	End With
End Sub

With HTML1
	.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
	.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"
End With

VB6

' ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
Private Sub HTML1_ExecuteContextMenu(ByVal Item As String,ByVal Position As Long)
	With HTML1
		Debug.Print( Item )
		Debug.Print( Position )
	End With
End Sub

With HTML1
	.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
	.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"
End With

VB.NET

' ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
Private Sub Exhtml1_ExecuteContextMenu(ByVal sender As System.Object,ByVal Item As String,ByVal Position As Integer) Handles Exhtml1.ExecuteContextMenu
	With Exhtml1
		Debug.Print( Item )
		Debug.Print( Position )
	End With
End Sub

With Exhtml1
	.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
	.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
	.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"
End With

VB.NET for /COM

' ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
Private Sub AxHTML1_ExecuteContextMenu(ByVal sender As System.Object, ByVal e As AxEXHTMLLib._IHTMLEvents_ExecuteContextMenuEvent) Handles AxHTML1.ExecuteContextMenu
	With AxHTML1
		Debug.Print( e.item )
		Debug.Print( e.position )
	End With
End Sub

With AxHTML1
	.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
	.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
	.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"
End With

C++

// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
void OnExecuteContextMenuHTML1(LPCTSTR Item,long Position)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXHTMLLib' for the library: 'ExHTML 1.0 Control Library'
		#import <ExHTML.dll>
		using namespace EXHTMLLib;
	*/
	EXHTMLLib::IHTMLPtr spHTML1 = GetDlgItem(IDC_HTML1)->GetControlUnknown();
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"Position" );
}

EXHTMLLib::IHTMLPtr spHTML1 = GetDlgItem(IDC_HTML1)->GetControlUnknown();
spHTML1->PutText(L"<img>1</img> Right click the image <img>pic1</img> to get resized.");
spHTML1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") +
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" +
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" +
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spHTML1->PutContextMenuItems(L"Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]");

C++ Builder

// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
void __fastcall TForm1::HTML1ExecuteContextMenu(TObject *Sender,BSTR Item,long Position)
{
	OutputDebugString( L"Item" );
	OutputDebugString( L"Position" );
}

HTML1->Text = L"<img>1</img> Right click the image <img>pic1</img> to get resized.";
HTML1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") +
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" +
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" +
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="));
HTML1->ContextMenuItems = L"Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]";

C#

// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
private void exhtml1_ExecuteContextMenu(object sender,string Item,int Position)
{
	System.Diagnostics.Debug.Print( Item.ToString() );
	System.Diagnostics.Debug.Print( Position.ToString() );
}
//this.exhtml1.ExecuteContextMenu += new exontrol.EXHTMLLib.exg2antt.ExecuteContextMenuEventHandler(this.exhtml1_ExecuteContextMenu);

exhtml1.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized.";
exhtml1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" +
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" +
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" +
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
exhtml1.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]";

JScript/JavaScript

<BODY onload='Init()'>
<SCRIPT FOR="HTML1" EVENT="ExecuteContextMenu(Item,Position)" LANGUAGE="JScript">
	alert( Item );
	alert( Position );
</SCRIPT>

<OBJECT CLASSID="clsid:0036F83C-D892-4B7B-AA0B-BEDD8D16A738" id="HTML1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	HTML1.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized.";
	HTML1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" +
	"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" +
	"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" +
	"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
	"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
	HTML1.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]";
}
</SCRIPT>
</BODY>

VBScript

<BODY onload='Init()'>
<SCRIPT LANGUAGE="VBScript">
Function HTML1_ExecuteContextMenu(Item,Position)
	With HTML1
		alert( Item )
		alert( Position )
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:0036F83C-D892-4B7B-AA0B-BEDD8D16A738" id="HTML1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With HTML1
		.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
		.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _
	"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _
	"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _
	"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
	"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
		.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
private void axHTML1_ExecuteContextMenu(object sender, AxEXHTMLLib._IHTMLEvents_ExecuteContextMenuEvent e)
{
	System.Diagnostics.Debug.Print( e.item.ToString() );
	System.Diagnostics.Debug.Print( e.position.ToString() );
}
//this.axHTML1.ExecuteContextMenu += new AxEXHTMLLib._IHTMLEvents_ExecuteContextMenuEventHandler(this.axHTML1_ExecuteContextMenu);

axHTML1.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized.";
axHTML1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" +
"/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" +
"/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" +
"x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
axHTML1.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]";

X++ (Dynamics Ax 2009)

// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
void onEvent_ExecuteContextMenu(str _Item,int _Position)
{
	;
	print( _Item );
	print( _Position );
}

public void init()
{
	str var_s;
	;

	super();

	exhtml1.Text("<img>1</img> Right click the image <img>pic1</img> to get resized.");
	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/";
	var_s = var_s + "oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/";
	var_s = var_s + "wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx";
	var_s = var_s + "3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exhtml1.Images(COMVariant::createFromStr(var_s));
	exhtml1.ContextMenuItems("Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]");
}

Delphi 8 (.NET only)

// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
procedure TWinForm1.AxHTML1_ExecuteContextMenu(sender: System.Object; e: AxEXHTMLLib._IHTMLEvents_ExecuteContextMenuEvent);
begin
	with AxHTML1 do
	begin
		OutputDebugString( e.item );
		OutputDebugString( e.position );
	end
end;

with AxHTML1 do
begin
	Text := '<img>1</img> Right click the image <img>pic1</img> to get resized.';
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/' + 
	'oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/' + 
	'wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx' + 
	'3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	ContextMenuItems := 'Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]';
end

Delphi (standard)

// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
procedure TForm1.HTML1ExecuteContextMenu(ASender: TObject; Item : WideString;Position : Integer);
begin
	with HTML1 do
	begin
		OutputDebugString( Item );
		OutputDebugString( Position );
	end
end;

with HTML1 do
begin
	Text := '<img>1</img> Right click the image <img>pic1</img> to get resized.';
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/' + 
	'oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/' + 
	'wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx' + 
	'3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	ContextMenuItems := 'Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]';
end

VFP

*** ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu. ***
LPARAMETERS Item,Position
	with thisform.HTML1
		DEBUGOUT( Item )
		DEBUGOUT( Position )
	endwith

with thisform.HTML1
	.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/"
	var_s = var_s + "oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/"
	var_s = var_s + "wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx"
	var_s = var_s + "3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	.Images(var_s)
	.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"
endwith

dBASE Plus

/*
with (this.ACTIVEX1.nativeObject)
	ExecuteContextMenu = class::nativeObject_ExecuteContextMenu
endwith
*/
// Occurs when the user selects an user item from the control's context menu.
function nativeObject_ExecuteContextMenu(Item,Position)
	local oHTML
	oHTML = form.Activex1.nativeObject
	? Str(Item) 
	? Str(Position) 
return

local oHTML

oHTML = form.Activex1.nativeObject
oHTML.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
oHTML.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oHTML.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"

XBasic (Alpha Five)

' Occurs when the user selects an user item from the control's context menu.
function ExecuteContextMenu as v (Item as C,Position as N)
	Dim oHTML as P
	oHTML = topparent:CONTROL_ACTIVEX1.activex
	? Item 
	? Position 
end function

Dim oHTML as P

oHTML = topparent:CONTROL_ACTIVEX1.activex
oHTML.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
oHTML.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oHTML.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"

Visual Objects

METHOD OCX_Exontrol1ExecuteContextMenu(Item,Position) CLASS MainDialog
	// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
	OutputDebugString(String2Psz( AsString(Item) ))
	OutputDebugString(String2Psz( AsString(Position) ))
RETURN NIL


oDCOCX_Exontrol1:Text := "<img>1</img> Right click the image <img>pic1</img> to get resized."
oDCOCX_Exontrol1:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oDCOCX_Exontrol1:ContextMenuItems := "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"

PowerBuilder

/*begin event ExecuteContextMenu(string Item,long Position) - Occurs when the user selects an user item from the control's context menu.*/
/*
	OleObject oHTML
	oHTML = ole_1.Object
	MessageBox("Information",string( String(Item) ))
	MessageBox("Information",string( String(Position) ))
*/
/*end event ExecuteContextMenu*/

OleObject oHTML

oHTML = ole_1.Object
oHTML.Text = "<img>1</img> Right click the image <img>pic1</img> to get resized."
oHTML.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oHTML.ContextMenuItems = "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"

Visual DataFlex

// Occurs when the user selects an user item from the control's context menu.
Procedure OnComExecuteContextMenu String llItem Integer llPosition
	Forward Send OnComExecuteContextMenu llItem llPosition
	Showln llItem llPosition
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComText to "<img>1</img> Right click the image <img>pic1</img> to get resized."
	Send ComImages "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	Set ComContextMenuItems to "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"
End_Procedure

XBase++

PROCEDURE OnExecuteContextMenu(oHTML,Item,Position)
	DevOut( Transform(Item,"") )
	DevOut( Transform(Position,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oHTML

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oHTML := XbpActiveXControl():new( oForm:drawingArea )
	oHTML:CLSID  := "Exontrol.HTML.1" /*{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}*/
	oHTML:create(,, {10,60},{610,370} )

		oHTML:ExecuteContextMenu := {|Item,Position| OnExecuteContextMenu(oHTML,Item,Position)} /*Occurs when the user selects an user item from the control's context menu.*/

		oHTML:Text := "<img>1</img> Right click the image <img>pic1</img> to get resized."
		oHTML:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oHTML:ContextMenuItems := "Insert[group=3](<img>1</img>[id=57763],<img>2</img>[id=57763]),Custom Item[id=1000]"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN