MouseEventHandler error

Aug 11 2010 5:21 AM

Hi experts

I have an error
 Cannot implicitly convert type 'System.Windows.Forms.MouseEventHandler' to 'System.EventHandler'

after I add ButtonMouseLeave event to the button.
Pls help me. I'm a newbie
Thanks
Here the code

  private void ShowHand(Panel aPanel, Hand aHand)
        {
            aPanel.Controls.Clear();
            Card aCard;
            Button aButton;
            for (int i = 0; i < aHand.Count; i++)
            {
                aCard = aHand[i];
                aButton = new Button();
                aPanel.Controls.Add(aButton);
                aButton.Image = (Image)m_icons[aCard.Suit];
                
                aButton.Text = aCard.FaceValue.ToString();

                aButton.TextAlign = ContentAlignment.BottomCenter;
                aButton.ImageAlign = ContentAlignment.TopCenter;
                aButton.FlatStyle = FlatStyle.Flat;
                aButton.Height = 40;
                aButton.Top = 45 * i;
                aButton.Tag = aCard;
                aButton.MouseDown += new System.Windows.Forms.MouseEventHandler(ButtonMouseDown);
                aButton.MouseMove += new System.Windows.Forms.MouseEventHandler(ButtonMouseMove);
                aButton.MouseLeave += new System.Windows.Forms.MouseEventHandler(ButtonMouseLeave); // error occurs 

            }

        }

        private void ButtonMouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            m_pickedUp = (Button)sender;
            ((Button)sender).DoDragDrop(sender, DragDropEffects.Move);
        }

        private void ButtonMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            this.lbTen.Text = ((Button)sender).Text;
        }

        private void ButtonMouseLeave(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            this.lbTen.Text = "";
        }

Answers (2)