-1

I have used menu tool strip in my form! I want menu to be dropped down when my cursor hovers on it! How to do this?

svick
  • 236,525
  • 50
  • 385
  • 514
Andy
  • 521
  • 3
  • 6
  • 22
  • Why would you want this? It violates all of the standard platform UI conventions. No other Windows application works this way. Why should yours be different? That will just confuse your users. – Cody Gray - on strike Apr 15 '12 at 11:02

1 Answers1

5

You can try using the MouseHover event of the menu item:

public Form1() {
  InitializeComponent();
  fileToolStripMenuItem.MouseHover += fileToolStripMenuItem_MouseHover;
}

private void fileToolStripMenuItem_MouseHover(object sender, EventArgs e) {
  fileToolStripMenuItem.ShowDropDown();
}

or the lambda version:

public Form1() {
  InitializeComponent();
  fileToolStripMenuItem.MouseHover += (s, e) => fileToolStripMenuItem.ShowDropDown();
}
LarsTech
  • 80,625
  • 14
  • 153
  • 225