473,796 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

disable mouse and keyboard

Alireza355
86 New Member
Dear friends,

I have a command button that when clicked, runs tens of queries, millions of calculations, etc.

This process takes about 10 seconds each time, and the mouse pointer rapidly changes into hourglass and changes back to pointer during this process.

If the user opens other forms or does other things while the main calculations are not finished yet, the results would be disaster. So I want to disarm the user by disabling mouse and keyboard before starting calculations, and re-enable them after finishing the calculations.


Possible??????? ????????
Jun 8 '09
18 16886
FishVal
2,653 Recognized Expert Specialist
MSDN: BlockInput()

Oh, yeah. Hangs as good as possible.
Jun 8 '09 #11
ADezii
8,834 Recognized Expert Expert
@NeoPa
BTW, what Degree of dodginess am I (1, 2, or 3)?

dodg·y (dj)
adj. dodg·i·er, dodg·i·est Chiefly British
  1. Evasive; shifty.
  2. Unsound, unstable, and unreliable.
  3. So risky as to require very deft handling
Jun 8 '09 #12
NeoPa
32,579 Recognized Expert Moderator MVP
Not you ADezii.

The potential is for the information you make available to be misused.

Obviously, you're well dodgy, but that's not the point :D
Jun 9 '09 #13
Alireza355
86 New Member
Thank you all, specially ADezii

Thank you so much.
Jun 9 '09 #14
ADezii
8,834 Recognized Expert Expert
@Alireza355
You are quite welcome. Be careful in the use of this code, and 'always' provide a mechanism for enabling Keyboard/Mouse Input once again should an Error occur midstream. Good Luck, and let us know how it all works out.
Jun 9 '09 #15
NeoPa
32,579 Recognized Expert Moderator MVP
That's always good advice ADezii, but from Fish's link it will recover itself on any unhandled crash and a Ctrl-Alt_Del always gives any operator the power to cancel this effect. This even reduces the dodginess factor :D
Jun 9 '09 #16
ADezii
8,834 Recognized Expert Expert
@NeoPa
This even reduces the dodginess factor
Does that mean that the code has been Dedoged? (LOL)
Jun 10 '09 #17
NeoPa
32,579 Recognized Expert Moderator MVP
Entirely? No. Predominantly though? Yes.

PS. Just because you see there are so many 'D's in the word is no excuse to leave one out. Is four 'D's too much for a single word? Probably yes.

Still should be De-dodged :D
Jun 10 '09 #18
ADezii
8,834 Recognized Expert Expert
@NeoPa
I stand corrected-ed! (LOL)!
Jun 10 '09 #19

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

Similar topics

1
12246
by: Michael J Whitmore | last post by:
Greetings, I have a very simple question. How do you simulate a user input to turn off a screen saver in Windows (either a mouse movement, mouse click, or keyboard input)? I promise I searched the newsgroup before asking :) I have written the following program that loads all my Webshots files into the Webshots photo manager, or so I thought. When you load the first it starts the screen saver. All other subsequent ones are not
0
2280
by: Alejandro Sánchez Acosta | last post by:
Hello, I have done a little aplication that does a remote connection to other machine and opens a vncclient to connect to the VNC in other machine (it's just for a network monitorization). Now I need that I can enable/disable the input of the keyboard/mouse both windows and Linux, any good idea about how to block the keyboard/mouse in python? any ioctl and win dll to do it?
5
4593
by: H.Bierhuizen | last post by:
Hello, Does anyone know how to disable the mouse on a specific form? So users are only allowed to use keyboard controls. Thanks already for answering. Hans __________________________________________________________________ Hans ICQ#: 4136259 Current ICQ status: + More ways to contact me __________________________________________________________________
2
5118
by: zalph | last post by:
1- Is it possible to disable the keyboard print screen... 2- ... in javascript? If so, how?
4
3920
by: mkaszub | last post by:
Hi, I have a problem with combobox. On my form is many comboboxes and when I select same option and use my mouse roll, combobox change to next value. How to disable mouse roller? I tried to change focus on another combo but it isn't good solution because you again cannot scroll page but change option in combobox. I also tried to change focus to parent -> combobox.parent.focus() but if combo is on bottom of the page view is centered and I...
2
2846
by: Boki | last post by:
Hi All, We can process the mouse/keyboard events by handling, however, how to create a event on a target form ( ex: webbrowser ) ? Thanks! Best regards, Boki.
0
1005
by: skip | last post by:
Sorry to bomb this list with an off-topic post, however... Ages ago I wrote a mouse/keyboard watcher in Python+Tk: http://sf.net/projects/watch. It's been idle for a long while though, isn't terribly portable and doesn't work properly with tools like Synergy (http://sf.net/projects/synergy2). Someone, I thought from this list or maybe python-dev, told me about a newer open source application in the same space which is more portable and...
1
1680
by: =?Utf-8?B?TXJOb2JvZHk=?= | last post by:
I want to do something similar to what some macro tools do, where they perform mouse/keyboard events on the user's machine , while intercepting the user's current keyboard/mouse events so that it does not interfere (unless they press a certain hotkey to deactivate it). How would I go about doing this?
2
3631
by: selvakumari | last post by:
Hi, i am new to C#, i have a multiselection treeview, where if i select a nodes with ctrl and shift corresponding nodes will be copied to another treenode, i want to unselect the childnode selection with ctrl and shift if parent node is selected. i think of disablin the mouse click event inside that treenode if parent node is selected?
0
9673
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
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9047
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...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
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
5440
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
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.