method PopupMenu.Attach (hWnd as Long)
Changes the window's menu bar.

   hWnd as Long A long expression that indicates the handle of the window  

Use the Attach method to attach a menu to a window. The control fires the Command event when the user selects an item. Use the Detach method to remove the window's menu bar. If you are calling this property in VB, you need to set the form's NegociateMenus property on False. Use the Show or ShowAtCursor property to display the control as a context menu.

The following screen show shows the menu when calling the Attach method:

Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.