PC Review


Reply
Thread Tools Rate Thread

How to capture Mouse Single click and mouse double click event

 
 
Sakharam Phapale
Guest
Posts: n/a
 
      10th Feb 2005
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






 
Reply With Quote
 
 
 
 
Publicjoe
Guest
Posts: n/a
 
      10th Feb 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse single click acts like double click M Skabialka Windows XP Hardware 3 26th Apr 2007 07:24 PM
Single Click/Double Click Missing Mouse Clicks =?Utf-8?B?TWlrZSBCaWVsZW4=?= Windows XP General 0 11th Nov 2006 02:29 PM
how to make a mouse double-click behave like a single-click Techsatish Microsoft Dot NET Framework Forms 2 28th Aug 2006 02:17 PM
Mouse Over Graph, Capture Information on Click(Double Click) =?Utf-8?B?RGVhbiBIaW5zb24=?= Microsoft Excel Programming 1 6th Dec 2004 04:49 AM
single mouse click acts like double mouse click Bryce Windows XP General 1 24th Aug 2004 11:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:58 PM.