UserCommand(long CommandID)

This event is fired when the user clicks the right mouse button and chooses a menu item.

The command ID associated with the menu item is passed as a parameter. See the SetRightButtonMenu method for information on creating menus.