For a double click be considered a "double-click", the mouse must be clicked
twice within the System.Information.DoubleClickTime property and within the
System.Information.DoubleClickSize area.
The MouseEventArgs has a property that lets you detect the number of clicks
within these parameters, i.e., MouseEventArgs.Clicks.
--
Dennis in Houston
"Herfried K. Wagner [MVP]" wrote:
"Boni" <oilia@nospam> schrieb: I am interested in mouse down and double click events of a control.
When doubleclick happens the processing for mouse down should't be done
I did follwing:
sub MyMouseDown(.) handles MouseDown(..)
if e.clicks>1 then return 'This is double click <-----------------(*)
...
end sub
sub DoubleClick(.) handles DoubleClick(..)
end sub
unfortunately when doubleclick happens the simple click seems to happen
too.
This behavior is by design. Otherwise it would be impossible to raise the
'Click' event directly after the click is performed by the user.
What is a proper way to handle this problem?
You could check if the time distance between the first and the second click
is greater than 'SystemInformation.DoubleClickTime', and raise the 'Click'
event after the period has elapsed and no consecutive click was performed.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>