コード例 #1
0
 //public override void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
 //{
 //    Console.WriteLine("Got KeyDown");
 //    switch (e.KeyCode)
 //    {
 //        case System.Windows.Forms.Keys.Down:
 //            menu.ScrollDown(5);
 //            break;
 //        case System.Windows.Forms.Keys.Up:
 //            menu.ScrollUp(5);
 //            break;
 //    }
 //}
 public override void OnMouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (menu.ClientArea.Contains(e.Location))
     {
         menu.OnMouseDown(sender, e);
         return;
     }
     base.OnMouseDown(sender, e);
 }