method PopupMenu.Detach ()
Detaches the window's menu, attached by the Attach method.

TypeDescription

Detaches the menu assigned with the Attach method. Use the Command event to notify your application that the user clicks an item.