2009-05-07 14 views

Respuesta

12

Esto debe hacerlo por usted:

private void notifyIcon1_Click(object sender, EventArgs e) 
     { 
      contextMenuStrip1.Show(Cursor.Position.X, Cursor.Position.Y); 
     } 
+0

Además, si usted necesita para mover el contenido en torno siempre se puede hacer X +/- 10 o algo – CodeLikeBeaker

8

Un método alternativo que he encontrado para trabajar un poco mejor:

private void notifyIcon1_MouseUp(object sender, MouseEventArgs e) 
    { 
     if (e.Button == MouseButtons.Left) 
     { 
      System.Reflection.MethodInfo mi = typeof(NotifyIcon).GetMethod("ShowContextMenu", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); 
      mi.Invoke(notifyIcon1, null); 
     } 
    } 
Cuestiones relacionadas