473,403 Members | 2,366 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,403 software developers and data experts.

Click and hold (need Info)

Hi again byters. I developed an access 2003 database which contains various different computer, servers, printer etc specifications.(thanks for all the help) The system will be implemented using a touchscreen. The user/ customer will be able to view the different models but will have no previlegies for updating.I have created an invisible small image on the screen that only I can locate and when i touch an hold this for 3 seconds i will have admin access and be able to go to my own personalised forms/queries. The question i have is how to tell this timing information to the click event. Any pointers or help would be appreciated greatly.
Apr 17 '08 #1
7 4459
FishVal
2,653 Expert 2GB
Hi, there.

Assuming touchscreen causes mouse events, you should something like:
  • In thecontrol_MouseDown event handler set a global variable to True and run form timer
  • In thecontrol_MouseUp event handler reset the global variable to False
  • In Form_Timer event handler check the global variable value and if True, then grant admin access.

Regards,
Fish
Apr 17 '08 #2
Thanks for the help. I still learning the basic syntax of vb for access. Ive got the concept in my head i just lack the experience an knowhow for example I wish to initialise the timer on mousedown event and stop it on mouse up event.Do we use the TimeInterval property?I know this property is measured in milliseconds Or alternatively if the timer on the mousedown event is > 3000 . (3sec)OpenForm/query screen. Below is what i wish to do. My apologies if it is a bit ambiguous Any suggestions


Abstract code for Mousedown event of image

Expand|Select|Wrap|Line Numbers
  1. Private Sub Image30_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.  
  3. 'starttimer
  4. dim timervalue
  5. timervalue='time mouse is pressed and held down
  6. if timervalue>3000
  7. 'openform etc
  8.  
  9. End Sub
  10.  
Apr 18 '08 #3
FishVal
2,653 Expert 2GB
Hi, there.
  • Form.TimerInterval property is used to initialize timer. When value is set timer begins to tick. As soon as predefined time will elapse Form_Timer event will be fired.
  • You code should be in 3 event handlers (see my previous post).
  • Anyway no mouse/touchscreen event will be fired on invisible control.
  • Do you really think that is the safest way to grant admin access to user? Or you've seen that in some movie? ;)

Kind regards,
Fish
Apr 18 '08 #4
Thanks again fish lol. Nice to see you have a sense of humour lol. No i was a bit inarticulate previously. The database is set up for customers to browse through a range of products classified by manufacture.
The idea behind the previous posts is that say for example the customer comes in wants a low spec model, with Vista . i press my magic button and display all models with the criteria they want. Its not so much admin more like a backend version.
Apr 18 '08 #5
Ps. It is invisible.but its a white image on a white backround. So it should fire
Apr 18 '08 #6
FishVal
2,653 Expert 2GB
Ok.

I don't like to bring bad news but it seems that it will be more complicated then it seemed before.
The problem is that
  • Access suspends code execution (including callbacks from OS) while mouse button is down. That means any useful code has to be in MouseDown event handler.
  • No event will be fired while event handler is active and there is no conventional way to determine mouse button state in running code.

The closest solution is to write code determining how much time mouse button was down on control.

Regards,
Fish
Apr 18 '08 #7
Thanks fish i got her going. I read through what you said again and relalised i had misread the the order in which the events happen. It doesn't fire till you let the mouse up again but it takes the 3 seconds into consideration.

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
  9.  
Simple but hard if you dont know how lol. thanks again fish for all the valuable pointers
regards
Panteraboy
Apr 24 '08 #8

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

Similar topics

10
by: BadOmen | last post by:
I want my program to send a mouse click to the window at the current mouse position, how do I do that? Example: I have my mouse over a button in Word and then my program is sending the left...
32
by: theodp | last post by:
Not to be outdone by Amazon's 1-Click patent, Microsoft snagged a patent from the USPTO Tuesday for a 'Time based hardware button for application launch', which covers causing different actions to...
18
by: nutso fasst | last post by:
Hello. Is there a way to make an element 'transparent' to mouse activity, such that mouse events go to the underlying element? I have an absolutely-positioned image element with transparency...
4
by: Ian Kelly | last post by:
Hi All, I have an .net form that is split into two frames. The left frame has a tree that displays a list of all the customers. The right frame displays the appropriate clients information. ...
2
by: davidgordon | last post by:
Hi, I have an intranet system I created in ASP. A problem I seem to run into now and then is when users are seletcting multiple lines of updates in a form, i.e. They enter quanties, select...
12
by: cj | last post by:
I would like to have menu items a main menu bar that represent the days of the week. When you click on them they alternate from checked to unchecked. Right now I have 7 subs that look like this...
0
by: botenremko | last post by:
Hi all! I am searching for a css or javascript with which I can perform the roll-over-and-click-to-hold functionality as can be seen in the main navigation menu of www.watersport-bank.nl. ...
0
by: Paul DeWitt | last post by:
I have a textbox on a Windows Form. I am wanting to display a popup form to request/validate info if the user clicks the textbox and have a different form (to delete data) load if the user either...
3
by: Bazza | last post by:
Hiya, New to VB.NET so this is probably a fairly easy solution(?!?!) I have an application which currently uses singleton forms. Great - everything worked fine except the users now want the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...
0
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,...

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.