Accelerator key call context menu

Discussion forum about all things older ANSI Team Developer versions.
Posts: 20
Joined: 30 Jul 2017, 18:27
Location: Argentina

Accelerator key call context menu

Post by landaware » 03 Feb 2018, 16:04

Hello guys,

I would like to get some help from the community. I need to call a context menu when F11 is keydown, in context menu keyboard accelerator I add F11 but it's not working I don't know. So I attemp to catch the event using the On VTM_KeyDown but I'm not sure how to call ContextMenu

!!CB!! 173
On VTM_KeyDown
If wParam = VK_F12 OR wParam = VK_F11
Call SalMessageBox ('F12','', MB_Ok)
Call SalSendMsg ( hWndItem, SAM_ContextMenu, wParam, lParam )

I also tried to use VisWinLoadAccelerator but never call the context menu

!!CB!! 173
On SAM_Create
Call SalSendClassMessage ( SAM_Create, wParam, lParam)
Set hKey = VisWinLoadAccelerator( hWndItem, SAM_ContextMenu, KDS_None, VK_F11, 0)

Anyway if I click using rigth button the context menu is triggered. In summary anyone who can help me to call context menu when F11 is press and the behavior will be the as if rigth button was clicked.
Note: I have installed CTD 3.0



Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Posts: 1161
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Accelerator key call context menu

Post by Dave Rabelink » 07 Feb 2018, 06:50

Do you mean your own menu or the default context menu?
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests