Código:
SetForegroundWindow hWnd
GetCursorPos PT
Ret = TrackPopupMenuEx(GetSystemMenu(hWnd, False), TPM_RETURNCMD , PT.x, PT.y, Me.hWnd, ByVal 0&)
SendMessage hWnd, WM_SYSCOMMAND, Ret, ByVal 0&
porque con algunas ventanas como la de firefox el menu no aparece y con el cmd me trae otros problemas
Saludos