Samples below demonstrates how to popup DotNetBar menu when using NotifyIcon control.

If you are using VS.NET 2005 download NotifyIconPopupMenuVS2005.zip project.

Here is relevant code that shows menu from NotifyIcon:

C#

Point p = Control.MousePosition;
Size popupSize = popup1.PopupSize();
 
// Calculate position properly taking in account the popup height and width
 
p.Offset(-popupSize.Width, -popupSize.Height);
 
// MUST Activate the form that is hosting DotNetBarManager so events are captured
// properly and closing of the menu is handled as expected.
 
this.Activate();
 
// Show the popup
 
popup1.Popup(p);

VB

Dim p As Point = Control.MousePosition
Dim popupSize As Size = popup1.PopupSize()
 
' Calculate position properly taking in account the popup height and width

p.Offset(-popupSize.Width, -popupSize.Height)
 
' MUST Activate the form that is hosting DotNetBarManager so events are captured
' properly and closing of the menu is handled as expected.

Me.Activate()
 
' Show the popup

popup1.Popup(p)

Samples:
NotifyIconPopupMenu
NotifyIconPopupMenuVS2005

Related posts:

  1. How to display any control on popup
  2. Data-binding on popup and DataSource
  3. How to create Excel like popup border toolbar
  4. How to create menu side-bar
  5. How to selectively display Gallery items based on Gallery state, popup or inline