How to capture Mouse Single click and mouse double click event

How to capture Mouse Single click and mouse double click event

Post by Sakharam P » Fri, 11 Feb 2005 18:30:59

Hi All,

How to capture Mouse Single click and mouse double click event on Commnad
Button.
I am doing as follows.

Private void Button1_MouseUp(Object sender,
System.Windows.Forms.MouseEventArgs e)

{

If (e.Clicks = 1)

{MsgBox("1");}

Else

{MsgBox("2");}

}

But each time I gets single click.
Even after clicking mouse button twice, events gets fired on first click and
I am not been able to capture double click event.

Any suggestions will be appreciated.

Thanks in advance
Sakharam Phapale

 
 
 

How to capture Mouse Single click and mouse double click event

Post by Publicjo » Fri, 11 Feb 2005 20:20:02

Hi Sakharam

You need to implement the DoubleClick event, which is part of this page in
the msdn online.
http://www.yqcomputer.com/
ture.asp

Hope this helps

Publicjoe

C# Tutorial at http://www.yqcomputer.com/
C# Snippets at http://www.yqcomputer.com/
C# Ebook at http://www.yqcomputer.com/
VB Tutorial at http://www.yqcomputer.com/
VB Ebook at http://www.yqcomputer.com/

Useful Articles at http://www.yqcomputer.com/




and