Back to product page

MenuClick event


Fires when user right-clicks on a menu item.

Syntax

  • Basic
Private Sub object_MenuClick(ID)
The MenuClick(object,ID) syntax has these parts:
objectA wodFtpDLX object.
IDA Long value. Menu ID of the selected menu item.

Remarks

Available only in ActiveX (GUI) version!

MenuClick event is fired when user performs right-click to get context menus, and then selects some item that doesn't belong to wodFtpDLX itself. You can insert your own menu items using InsertMenu API to existing ContextMenu handle - by selecting

GetSubMenu(0) for white background menus
GetSubMenu(1) for menu items shown when File is clicked
GetSubMenu(2) for menu items shown when Folder is clicked


when you add such menu item, you can handle it through this event using corresponding menu ID
For example, to add menu item to background menu, you can use code like this:
 
InsertMenu GetSubMenu(wodFtpDLX1.ContextMenu, 0), 33701, MF_BYCOMMAND + MF_STRING, 33701, "Test" 'background menu

then you can catch user's click here using MenuClick where ID = 33701. For a list of all predefines menus, look at ContextMenu property.

Platforms

Windows