By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,316 Members | 2,132 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,316 IT Pros & Developers. It's quick & easy.

How to capture Mouse Single click and mouse double click event

P: n/a
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


Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Sakharam

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

Hope this helps

Publicjoe

C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html
VB Tutorial at http://www.publicjoe.f9.co.uk/vbnet/vbnet.html
VB Ebook at http://www.publicjoe.f9.co.uk/vbnet/samples/ebook.html

Useful Articles at http://www.madsally.co.uk
"Sakharam Phapale" <sp******@annetsite.com> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl...
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


Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.