title: Right click menu and menu line
body: <p>Goal:<br>
  Right clicking in the listview and choose different option.</p>
  
  <p>Problem:<br>
  There are two problem:<br>
  *When I'm right clicking, the left corner of the menu is not exactly located in the arrow's spot location.<br>
  *How do I create a line in the menu?</p>
  
  <p>The main problem about the menu</p>
  
  <h2><img src="https://i.stack.imgur.com/etWVT.gif" alt="The menu is not located in the right spot once you are right clicking"></h2>
  
  <p>Need support to create these two redmark.</p>
  
  <h2><img src="https://i.stack.imgur.com/KezqD.gif" alt="Request to fulfill these two red marked"></h2>
  
  <pre><code>private void lstV_Stock_MouseUp(object sender, MouseEventArgs e)
  {
      switch (e.Button)
      {
  
          // Right mouse click
              case MouseButtons.Right:
  
  
                  ContextMenu myContextMenu = new ContextMenu();
  
                  MenuItem menuItem1 = new MenuItem("New product");
                  MenuItem menuItem2 = new MenuItem("Delete");
                  MenuItem menuItem3 = new MenuItem("Add quantity");
  
  
                  // Clear all previously added MenuItems.
                  myContextMenu.MenuItems.Clear();
  
                  myContextMenu.MenuItems.Add(menuItem1);
                  myContextMenu.MenuItems.Add(menuItem2);
                  myContextMenu.MenuItems.Add(menuItem3);
  
                  if (lstV_Stock.SelectedItems.Count &gt; 0) 
                  {
  
                      foreach (ListViewItem item in lstV_Stock.SelectedItems)
                      {
                          myContextMenu.MenuItems[1].Visible = true;
                          myContextMenu.MenuItems[2].Visible = true;
                          myContextMenu.MenuItems[0].Visible = false;
                      }
  
                  }
                  else
                  {
                      myContextMenu.MenuItems[1].Visible = false;
                      myContextMenu.MenuItems[2].Visible = false;
                      myContextMenu.MenuItems[0].Visible = true;
                  }
  
                  myContextMenu.Show(lstV_Stock, this.PointToClient(Cursor.Position), LeftRightAlignment.Right);
  
  
  
                  menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
  
  
                  break;
  
          }
  </code></pre>