I want to know how to override the mouse events of a ToolStripButton,specifically MouseEnter and MouseDown/MouseUp.
I've found many examples of this in the net but i don't know how to use them.Let's say this:

protected override void OnMouseEnter(EventArgs e)
{
base.OnMouseEnter(e);
}

Yeah,and then what?I really don't know how to use it...Can someone help me with that with some example or something?Thanks in advance.

Recommended Answers

All 4 Replies

put e.Handled = true

Umm,'e' doesn't have Handled property...

Nonsense post. check the one below...

Wait hold on....stop right here....I just realised that using protected overide will affect the host form's event, and not the toolstripwhachamacallit (unless you are programming it in an inherited class of the toolstripthingy...didn't think so).

EDIT: I am not convinced that I do not know what I am talking about...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.