event Highlight (ID as Long)
Fired when an item is highlighted.

TypeDescription
ID as Long A long expression that indicates the identifier of the item being highlighted. 

The Highlight event occurs when the cursor hovers the item. Use the Item property to access an item giving its identifier. Use the Select event property to notify your application that a new items is selected. Use the Caption property to specify the caption of the item. 

Syntax for Highlight event, /NET version, on:

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

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

Syntax for Highlight event, /COM version, on:

private void Highlight(object sender, AxEXMENULib._IMenuEvents_HighlightEvent e)
{
}

void OnHighlight(long ID)
{
}

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

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

procedure Highlight(sender: System.Object; e: AxEXMENULib._IMenuEvents_HighlightEvent);
begin
end;

begin event Highlight(long ID)
end event Highlight

Private Sub Highlight(ByVal sender As System.Object, ByVal e As AxEXMENULib._IMenuEvents_HighlightEvent) Handles Highlight
End Sub

Private Sub Highlight(ByVal ID As Long)
End Sub

Private Sub Highlight(ByVal ID As Long)
End Sub

LPARAMETERS ID

PROCEDURE OnHighlight(oExMenu,ID)
RETURN

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

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

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

Procedure OnComHighlight Integer llID
	Forward Send OnComHighlight llID
End_Procedure

METHOD OCX_Highlight(ID) CLASS MainDialog
RETURN NIL

void onEvent_Highlight(int _ID)
{
}

function Highlight as v (ID as N)
end function

function nativeObject_Highlight(ID)
return

The following VB sample displays the caption of the highlighted item:

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

The following C++ sample displays the caption of the highlighted item:

#include "Item.h"
void OnHighlightExmenu1(long ID) 
{
	CItem item = m_menu.GetItem( COleVariant(ID) );
	OutputDebugString( item.GetCaption() );
}

The following VB.NET sample displays the caption of the highlighted item:

Private Sub AxExMenu1_Highlight(ByVal sender As Object, ByVal e As AxEXMENULib._IMenuEvents_HighlightEvent) Handles AxExMenu1.Highlight
    Debug.WriteLine(AxExMenu1.item(e.iD).Caption)
End Sub

The following C# sample displays the caption of the highlighted item:

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

The following VFP sample displays the caption of the highlighted item:

*** ActiveX Control Event ***
LPARAMETERS id

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