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). 9 7979
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.epix.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).
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*****@localhost.notwrote in message
news:j0cyg.9035$V74.2060@trnddc08...
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.epix.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).
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 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).
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(Button 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(GetQueueStatus(QS_MOUSEBUTTON))
GetCursorPos p
SetCursorPos pX, p.Y
NewTop = t + (p.Y - pY) / mPixelsPerTwipVerticalFactor
If NewTop < mMinTop Then
If .Top <mMinTop Then
.Top = mMinTop
SpeedControlColor
Me.Repaint
If mMinTop - NewTop 28 Then Exit Do
End If
ElseIf NewTop mMaxBottom Then
If .Top <mMaxBottom Then
.Top = mMaxBottom
SpeedControlColor
Me.Repaint
If NewTop - mMaxBottom 28 Then Exit Do
End If
Else
.Top = NewTop
SpeedControlColor
Me.Repaint
End If
Loop
End With
SetCrementInterval 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.
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.
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
Lyle -
I'll have to absorb this for a bit, looks interesting.
Thanks,
Armando
"Lyle Fairfield" <ly***********@aim.comwrote in message
news:11********************@75g2000cwc.googlegroup s.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(Button 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(GetQueueStatus(QS_MOUSEBUTTON))
GetCursorPos p
SetCursorPos pX, p.Y
NewTop = t + (p.Y - pY) / mPixelsPerTwipVerticalFactor
If NewTop < mMinTop Then
If .Top <mMinTop Then
.Top = mMinTop
SpeedControlColor
Me.Repaint
If mMinTop - NewTop 28 Then Exit Do
End If
ElseIf NewTop mMaxBottom Then
If .Top <mMaxBottom Then
.Top = mMaxBottom
SpeedControlColor
Me.Repaint
If NewTop - mMaxBottom 28 Then Exit Do
End If
Else
.Top = NewTop
SpeedControlColor
Me.Repaint
End If
Loop
End With
SetCrementInterval 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.
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
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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
--
|
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...
|
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...
|
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...
|
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:
...
|
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...
|
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
|
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"....
|
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,...
|
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...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |