event Command (ID as Long)
Occurs when the user selects a menu bar item.

 TypeDescription 
   ID as Long A long expression that indicates the identifier of the command being selected.  

Use the Command event to notify your application when an item is selected. The Command event is fired only if the menu is attached to a form using the Attach method. The Command event is never fired if you display the control using the Show or ShowAtCursor properties. Use the Attach method to attach a menu bar to a dialog or a form. The Command event is fired when user clicks or selects an item from the dialog/form's menu bar

Syntax for Command event, /NET version, on:

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

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

Syntax for Command event, /COM version, on:

private void Command(object sender, AxEXPOPUPMENULib._IPopupMenuEvents_CommandEvent e)
{
}

void OnCommand(long ID)
{
}

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

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

procedure Command(sender: System.Object; e: AxEXPOPUPMENULib._IPopupMenuEvents_CommandEvent);
begin
end;

begin event Command(long ID)
end event Command

Private Sub Command(ByVal sender As System.Object, ByVal e As AxEXPOPUPMENULib._IPopupMenuEvents_CommandEvent) Handles Command
End Sub

Private Sub Command(ByVal ID As Long)
End Sub

Private Sub Command(ByVal ID As Long)
End Sub

LPARAMETERS ID

PROCEDURE OnCommand(oPopupMenu,ID)
RETURN

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

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

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

Procedure OnComCommand Integer llID
	Forward Send OnComCommand llID
End_Procedure

METHOD OCX_Command(ID) CLASS MainDialog
RETURN NIL

void onEvent_Command(int _ID)
{
}

function Command as v (ID as N)
end function

function nativeObject_Command(ID)
return


Send comments on this topic.
1999-2016 Exontrol.COM, Software. All rights reserved.