473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

TimerInterval & events (any pointers)

Hey there again byters .My previous post was called click & hold(need info). I thought i had solved the problem but after testing i realise that its no doing what its supposed to. i wished to open a form after holding down the mouse on an image for 3 seconds. But the code just waits 3seconds to go to the form after clicking. if the user doent hold down the mouse for 3 seconds i dont want the form to open. Any suggestions gurus

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2. DoCmd.OpenForm ("pcspecs2")
  3. Me.TimerInterval = 0
  4.  
  5. End Sub
  6. Private Sub Image30_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  7. Me.TimerInterval = 3000
  8. End Sub
I tried using this code too but to know avail
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2.  
  3. If (Me.TimerInterval <= 3000) Then
  4. DoCmd.OpenForm ("pcspecs2")
  5. Me.TimerInterval = 0
  6. End If
  7.  
  8. End Sub
  9.  
  10. Private Sub Image11_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  11.  
  12. Me.TimerInterval = 0
  13. End Sub
Apr 24 '08 #1
3 2756
NeoPa
32,556 Expert Mod 16PB
I would forget the TimerInterval code.

Consider logging the time the mouse is clicked down, then check the Up-time and if the difference is less than 3,000ms then cancel the Click event.

Does that make sense?
Apr 25 '08 #2
Thanks yes it does. But i dont know how to retrieve the time of mouse down event or the time of the mouse up event. Is there a form current time property that i can retrieve this info from.
Apr 25 '08 #3
NeoPa
32,556 Expert Mod 16PB
timeGetTime() vs Timer() should give you all you need to know.

If not, let us know the specifics of anything you need help with.
Apr 25 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: HankC | last post by:
Greetings: I'm been programming Delphi for a while and am trying to get into the Python mindset. In Delphi, you can have a component class that has properties, methods, and events. Properties...
5
by: jab3 | last post by:
(again :)) Hello everyone. I'll ask this even at risk of being accused of not researching adequately. My question (before longer reasoning) is: How does declaring (or defining, whatever) a...
72
by: Paminu | last post by:
In math this expression: (a < b) && (b < c) would be described as: a < b < c But why is it that in C these two expressions evaluate to something different for the same values of a, b and...
4
by: LP | last post by:
Hello! I am still transitioning from VB.NET to C#. I undertand the basic concepts of Delegates, more so of Events and somewhat understand AsyncCallback methods. But I need some clarification on...
2
by: Mike | last post by:
Greetings, It would seem that this topic has been discussed at some length, but I was unable to discern whether there was a clear cut solution to resolve and/or otherwise workaround the issue. ...
32
by: Joe | last post by:
I am just starting to use Object Oriented PHP coding, and I am seeing quite often the following (this example taken from a wiki): $wakka =& new Wakka($wakkaConfig); What exactly is the =&, and...
3
by: timekeepumd | last post by:
I am having an issue with TimerInterval code changing the focus of my database. I created a menubar that has a Close button on it connected to a macro that closes the active form. The TimerInterval...
1
by: MLH | last post by:
The TimerInterval property setting is a Long Integer value between 0 and whatever you set it to. The countdown starts when the form loads and that is what I would like to read. Any way to read an...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.