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

keyboard and system inavtivity

Hello NG,

I want to find if there is any user input (via mouse and keyboard only) even
my app do not have focus (minimized or in background). How can I do that in
managed code?

Thx,
Po
Nov 16 '05 #1
2 1625
Unfortunately there isn't an easy way to do this that works across different
versions of Windows.
Most applications adopt a global keyboard and mouse hook, which can monitor
activity and set a flag accordingly.

Global hooks in .net aren't as easy as they could be... luckily there's some
free code to help you out:
http://www.codeproject.com/csharp/GlobalSystemHook.asp

--
John Wood
Blog: http://spaces.msn.com/members/johnwood

"Pohihihi" <pohihihi@ho> wrote in message
news:OR**************@TK2MSFTNGP15.phx.gbl...
Hello NG,

I want to find if there is any user input (via mouse and keyboard only) even my app do not have focus (minimized or in background). How can I do that in managed code?

Thx,
Po

Nov 16 '05 #2
thanks.
"John Wood" <john.wood@priorganize_nospam__.com> wrote in message
news:es**************@TK2MSFTNGP15.phx.gbl...
Unfortunately there isn't an easy way to do this that works across
different
versions of Windows.
Most applications adopt a global keyboard and mouse hook, which can
monitor
activity and set a flag accordingly.

Global hooks in .net aren't as easy as they could be... luckily there's
some
free code to help you out:
http://www.codeproject.com/csharp/GlobalSystemHook.asp

--
John Wood
Blog: http://spaces.msn.com/members/johnwood

"Pohihihi" <pohihihi@ho> wrote in message
news:OR**************@TK2MSFTNGP15.phx.gbl...
Hello NG,

I want to find if there is any user input (via mouse and keyboard only)

even
my app do not have focus (minimized or in background). How can I do that

in
managed code?

Thx,
Po


Nov 16 '05 #3

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

Similar topics

6
by: daFritz | last post by:
Hi! I need to prevent Task-Switching in my App, so I tried to implement a low level keyboard hook in a extra class. But it seems that the Parameters are not passed correctly to my Hook function....
3
by: Paul Aspinall | last post by:
Hi I have an MDI app.... All child MDI windows are non-updateable... however, the users may leave the windows open... and there can be several of them. I want to implement a system to dispose...
2
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
4
by: jonathandrott | last post by:
Hi, i'm kinda new to vb.net and i'm trying to make an on screen keyboard to use with a touch screen. how do i get it to print a letter on the screen when the button is pressed in the textbox that...
9
by: Kbalz | last post by:
I have an application that minimizes itself, and I want it to listen for certain key commands, and when they are pressed, my program can react to them. So far I've gotten my application to react...
7
by: RADAR | last post by:
i use VC++ 6,0 and i have problems with getting keyboard system inputs and to use them to check to proceed or break the loop. for example if i want to proceed until Ctrl+z is written for input.What...
1
by: Techno3000 | last post by:
import java.io.*; import java.awt.*; import hsa.Console; public class Calculator { static Console c; public static void main (String args) throws IOException
1
by: Aycex | last post by:
I am taking my first java class as i am a Database person this is quite interesting and here is my problem. We are supposed to be learning to overload a class and i believe i have my code correct...
1
by: MBMSOFT | last post by:
Any idea how to change system keyboard language with vba I tried changing keyboard property in the control property and it works but i need change in one control only, and if i change property...
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
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
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
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
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...
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,...
0
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...

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.