You could just check which mouse button was pressed
protected override void OnMouseClick(MouseEventArgs e)
{
base.OnMouseClick(e);
if (e.Button == MouseButtons.Left)
MessageBox.Show("Pushed left button");
if (e.Button == MouseButtons.Right )
MessageBox.Show("Pushed right button");
}
It's a bit basic but should do the trick.
SMJT
> hi all
>
[quoted text clipped - 7 lines]
> Thanx in advance
> James
James - 11 Jul 2006 13:15 GMT
hello dear,
I had made a usercontrol containing No. of clickable child
controls.
thanks for your Help.
But Overriding OnMouseDown event in my User control would catch
only Mouse clicks on thus parent control not on child controls.
I also want to check if any Child control is clicked and which User has
preesed which Button ( Left or right). But doing this way , I have to
handle Mouse event on each child controls also which is in efficient.
any Better Ideas you have, can solve my problem.
Thanks
James
> You could just check which mouse button was pressed
>
[quoted text clipped - 21 lines]
> > Thanx in advance
> > James