473,588 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable Double-Click?

I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the object's
Top (or Left) properties, but you can only click slowly. That is, every
other click is ignored, because Access is seeing a double click event. I
would put the same code there, except I'm also using the SHIFT key (during
mouse click) to cause bigger moves, and there's no SHIFT flag for the
OnDoubleClick event.

Can anyone see a way around this? Something with OnKeyPress? Haven't
played around there yet. If I could get to the double-click timing on the
PC's mouse properties... hmmm, I don't think I'd want to mess with that.
I've tried to simulate drag-n-drop, but it's pretty cheesy. And I like to
be able to control the exact move increments, to help with object alignment
(sort of snap-to-invisible-grid).
Jul 27 '06 #1
9 8036
My recollection was that if you had both Click and DoubleClick events, the
(Single) Click event would fire prior to the Double Click. I just tried that
to refresh my memory and that is exactly what happened; then I simply
removed the code from the DoubleClick event, and double clicked -- only the
Click event fired.

"Way around _what_", specifically? Sounds to me you may want to use control
panel and settings to change the interval between clicks for double click.
Or put in an empty DoubleClick event.

Larry Linson
Microsoft Access MVP

"Armando" <ar*****@bogus. comwrote in message
news:cE******** *******@news1.e pix.net...
>I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the
object's Top (or Left) properties, but you can only click slowly. That is,
every other click is ignored, because Access is seeing a double click
event. I would put the same code there, except I'm also using the SHIFT
key (during mouse click) to cause bigger moves, and there's no SHIFT flag
for the OnDoubleClick event.

Can anyone see a way around this? Something with OnKeyPress? Haven't
played around there yet. If I could get to the double-click timing on the
PC's mouse properties... hmmm, I don't think I'd want to mess with that.
I've tried to simulate drag-n-drop, but it's pretty cheesy. And I like to
be able to control the exact move increments, to help with object
alignment (sort of snap-to-invisible-grid).

Jul 27 '06 #2
A "way around" the missed mouse clicks. Even though I know why it's
happening, it might appear to the user that something's not working right.
I put in an empty event for double-click, and it still stutters (a promising
suggestion though). As for getting into Control Panel to mess with the
mouse settings, I wasn't sure I could do that from within Access (can't ask
the user to do that), or if I even wanted to go there at all.

I'm prepared to be satisfied with the way it's working now - the user won't
have to come back to this screen very often once the design is done. Just
my inner perfectionist nagging me.

Thanks!

"Larry Linson" <bo*****@localh ost.notwrote in message
news:j0cyg.9035 $V74.2060@trndd c08...
My recollection was that if you had both Click and DoubleClick events, the
(Single) Click event would fire prior to the Double Click. I just tried
that to refresh my memory and that is exactly what happened; then I simply
removed the code from the DoubleClick event, and double clicked -- only
the Click event fired.

"Way around _what_", specifically? Sounds to me you may want to use
control panel and settings to change the interval between clicks for
double click. Or put in an empty DoubleClick event.

Larry Linson
Microsoft Access MVP

"Armando" <ar*****@bogus. comwrote in message
news:cE******** *******@news1.e pix.net...
>>I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the
object's Top (or Left) properties, but you can only click slowly. That
is, every other click is ignored, because Access is seeing a double click
event. I would put the same code there, except I'm also using the SHIFT
key (during mouse click) to cause bigger moves, and there's no SHIFT flag
for the OnDoubleClick event.

Can anyone see a way around this? Something with OnKeyPress? Haven't
played around there yet. If I could get to the double-click timing on
the PC's mouse properties... hmmm, I don't think I'd want to mess with
that. I've tried to simulate drag-n-drop, but it's pretty cheesy. And I
like to be able to control the exact move increments, to help with object
alignment (sort of snap-to-invisible-grid).


Jul 28 '06 #3
On Thu, 27 Jul 2006 20:48:08 GMT, "Armando" <ar*****@bogus. comwrote:

I understand you have a UI in which the user can move a button by
slowly clicking on it.
An alternative design would be:
- user selects the Move mode
- user selects the button to move, by clicking it. Button indicates
its selected state, perhaps by changing the text color.
- user interacts with 4 up, down, left, right buttons on a control
panel. You can even use AutoRepeat=Yes allowing the user to keep the
button depressed so the selected button continues to move in that
direction.

Indulge me: why are you providing this functionality?

-Tom.

>I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the object's
Top (or Left) properties, but you can only click slowly. That is, every
other click is ignored, because Access is seeing a double click event. I
would put the same code there, except I'm also using the SHIFT key (during
mouse click) to cause bigger moves, and there's no SHIFT flag for the
OnDoubleClic k event.

Can anyone see a way around this? Something with OnKeyPress? Haven't
played around there yet. If I could get to the double-click timing on the
PC's mouse properties... hmmm, I don't think I'd want to mess with that.
I've tried to simulate drag-n-drop, but it's pretty cheesy. And I like to
be able to control the exact move increments, to help with object alignment
(sort of snap-to-invisible-grid).
Jul 28 '06 #4
Armando wrote:
I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the object's
To do this I use the MouseDown Event as follows:

Private Sub lblSpeedControl _MouseDown(Butt on As Integer, Shift As
Integer, X As Single, Y As Single)
Dim NewTop As Single
Dim pY As Single
Dim pX As Single
Dim c As Single
Dim p As POINTAPI
Dim r As Single
Dim t As Long
t = lblSpeedControl .Top
If Button = acLeftButton Then
GetCursorPos p
pX = p.X
pY = p.Y
With lblSpeedControl
Do While Not CBool(GetQueueS tatus(QS_MOUSEB UTTON))
GetCursorPos p
SetCursorPos pX, p.Y
NewTop = t + (p.Y - pY) / mPixelsPerTwipV erticalFactor
If NewTop < mMinTop Then
If .Top <mMinTop Then
.Top = mMinTop
SpeedControlCol or
Me.Repaint
If mMinTop - NewTop 28 Then Exit Do
End If
ElseIf NewTop mMaxBottom Then
If .Top <mMaxBottom Then
.Top = mMaxBottom
SpeedControlCol or
Me.Repaint
If NewTop - mMaxBottom 28 Then Exit Do
End If
Else
.Top = NewTop
SpeedControlCol or
Me.Repaint
End If
Loop
End With
SetCrementInter val lblSpeedControl .Top / mMaxBottom
End If
End Sub

Of course this calls other functions, but perhaps you can get the idea.
The Double Click never comes into play here, as
GetQueueStatus( QS_MOUSEBUTTON) monitors any change (such as releasing
the left button) and stops dragging the control.

Jul 28 '06 #5
Indulge me: why are you providing this functionality?

Butting in ... I use it to move a (vba/api only) slider; the slider
controls the speed at which my calendar moves from month to month, year
to year, when its buttons are pressed. We are likely to want it to be
fast if we are moving a long way, slow if we are being precise; or we
may simply have a personal preference.

Jul 28 '06 #6
Hi Tom -

For your indulgence: I'm using EIGHT buttons to move and size rectangles
which represent the arrangement of real-world items, which are managed one
at a time by clicking on them (in non-design mode).

To your suggestion - AutoRepeat sounds pretty good. I just tried it, and
the new location doesn't display until the mouse is released. But it DOES
keep moving while pressed, you just have to let go to see how far. This
might be acceptable, it's one of the better ideas so far.

Thanks for your interest,

Armando
Jul 29 '06 #7
Lyle -
I'll have to absorb this for a bit, looks interesting.
Thanks,
Armando
"Lyle Fairfield" <ly***********@ aim.comwrote in message
news:11******** ************@75 g2000cwc.google groups.com...
Armando wrote:
>I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the
object's

To do this I use the MouseDown Event as follows:

Private Sub lblSpeedControl _MouseDown(Butt on As Integer, Shift As
Integer, X As Single, Y As Single)
Dim NewTop As Single
Dim pY As Single
Dim pX As Single
Dim c As Single
Dim p As POINTAPI
Dim r As Single
Dim t As Long
t = lblSpeedControl .Top
If Button = acLeftButton Then
GetCursorPos p
pX = p.X
pY = p.Y
With lblSpeedControl
Do While Not CBool(GetQueueS tatus(QS_MOUSEB UTTON))
GetCursorPos p
SetCursorPos pX, p.Y
NewTop = t + (p.Y - pY) / mPixelsPerTwipV erticalFactor
If NewTop < mMinTop Then
If .Top <mMinTop Then
.Top = mMinTop
SpeedControlCol or
Me.Repaint
If mMinTop - NewTop 28 Then Exit Do
End If
ElseIf NewTop mMaxBottom Then
If .Top <mMaxBottom Then
.Top = mMaxBottom
SpeedControlCol or
Me.Repaint
If NewTop - mMaxBottom 28 Then Exit Do
End If
Else
.Top = NewTop
SpeedControlCol or
Me.Repaint
End If
Loop
End With
SetCrementInter val lblSpeedControl .Top / mMaxBottom
End If
End Sub

Of course this calls other functions, but perhaps you can get the idea.
The Double Click never comes into play here, as
GetQueueStatus( QS_MOUSEBUTTON) monitors any change (such as releasing
the left button) and stops dragging the control.

Jul 29 '06 #8
On Sat, 29 Jul 2006 04:40:08 GMT, "Armando" <ar*****@bogus. comwrote:

Put a DoEvents in the event, and it should repaint each time.
-Tom.

>Hi Tom -

For your indulgence: I'm using EIGHT buttons to move and size rectangles
which represent the arrangement of real-world items, which are managed one
at a time by clicking on them (in non-design mode).

To your suggestion - AutoRepeat sounds pretty good. I just tried it, and
the new location doesn't display until the mouse is released. But it DOES
keep moving while pressed, you just have to let go to see how far. This
might be acceptable, it's one of the better ideas so far.

Thanks for your interest,

Armando
Jul 29 '06 #9
Tom -

[AutoRepeat with DoEvents] is the PERFECT solution! It allows a single
click before the repeat happens (for small moves) and the repeat takes care
of large moves, so I don't have to check for SHIFT anymore.

A thousand thanks, this one is solved.
Jul 30 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4926
by: JML | last post by:
Hi guys, I need HELP I am trying to disable submit button after user submits the form. thanks in advance --
5
5973
by: Bob Bedford | last post by:
I create checkboxes using datas from a database (with PHP). I store all values in an array, as I must pass this value like a Form value. Now, in some cases, when a checkbox is selected, I must disactivate other checkboxes. How can I do this ? here is the code:
2
1846
by: MT | last post by:
Hi, I am currently validating an XML file against a Schema using XMLValidatingReader. The schema actually contains ranges for particular elements and I have been using it to detect range errors before it gets to my program. The way the rangechecking works is that every element that needs range checking is defined as an element with a particular type in the XSD. For example, <xs:element name="Row" maxOccurs="48">
0
1179
by: John Grandy | last post by:
On a .aspx page I have seen commercial controls that serve as replacements for the <asp:Button> control that immediately disable the button on form submission so that accidental double-clicks (or impatient multi-clicks ) do not trigger the server-side event-handler multiple times .... However, 3rd party controls are not an option for this app. Currently, I have an <a href='...' > tag embedded in an <asp:ItemTemplate> in an...
4
3118
by: Chris | last post by:
I have an asp.net page say page1.aspx. The form in html code is <form id = "Form1"> And i want to disable all the fields of the form after some code steps. I had created a javascript funct: function disable() { alert("Forms length is :" + Form1.length); for (i = 0; i < Form1.length; i++) { var formElement = Form1.elements;
2
1940
by: ibiza | last post by:
Hi all, I have a quite big webform that has about ~15 validators. I found, after having looked at the generated HTML source, that the filesize is pretty big : about 65KB. Then, I added to every validator the property EnableClientScript="False", because I already have my neat client validation scripts. That cut off the size of the generated source to ~45KB. However, even if there is no asp.net client script supposed to validate
2
7255
by: Ryan Liu | last post by:
In C#, for a large float (9 digitals), how can I disable Scientific notation. When it auto convert to Scientific notation, I lost accuracy. Thanks a lot! Ryan
4
2717
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit". Ignoring the server side of things, does anyone see any holes with the following script? It seems to work, but I'd appreciate other eyes on it. Maybe a try/catch/finally wrapper of some sort to be sure the link is re-enabled in the face of an...
19
9856
by: RedDevilDan | last post by:
I am working on a Memory Footprint Reduction project. I came across an idea to disable all printf statements so that less memory is required. In addition, when there is no single printf statement, the printf library will not be linked, so it further reduces the executable size. Is there an easy way to disable printf in a large project? In my project, we have thousands of C & C++ files. They don't have a common included common header. ...
12
12387
by: =?Utf-8?B?bV9nZWxs?= | last post by:
Hi, anyone know how to disable reflection on sensitive code? Here is specifically what I'm trying to do. I have one method in a class within an assembly I'm trying to prevent using reflection to see the code. The code contains a hardcoded key word that I do not want to be seen in any way. I've tried using ReflectionPermissionAttribute but don't know if this will do what I want.
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6634
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5398
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3847
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.