title: How to visible true menustrip's toolstripmenuitem and its sub menu?
body: <p>i have a menustrip in which i have inserted some toolstripmenuitem and three sub menus.At the time of login i want to make <code>visible=true</code> for all the items in menu strip. but i am unable to do so.this is my code.</p>
  
  <p><strong>Code</strong>:</p>
  
  <pre><code>private void SetToolStripItems(ToolStripItemCollection dropDownItems)
          {
              try
              {
                  foreach (object obj in dropDownItems)
                  {
                      if (obj.GetType().Equals(typeof(ToolStripMenuItem)))
                      {
                          ToolStripMenuItem subMenu = (ToolStripMenuItem)obj;
                          if (subMenu.HasDropDownItems)
                          {
                              subMenu.Visible = true;
                          }
                          else // Do the desired operations here.
                          {
                              subMenu.Visible = true;
                          }
                      }
                  }
              }
              catch (Exception ex)
              {
                  //
              }
          }
  </code></pre>