Low Level Keyboard read

Least i think i want a low level keybd read, unless im missing something!

i have a set of routines that react to simple keystrokes (a-z/0-9) but
the routines are not linked to anything that has focus - so i cant
use a text box or form key handler. ok so i need to poll the keys pressed...
ive looked & looked and all examples seem to show how to sendkeys and do
interesting things but nothing seems to cover this basic want.

how do i continually get the key presses from the keybd so i can process and
do stuff with?

rgds
Shilling

ShillingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richie_SimonettiIT OperationsCommented:
0
Richie_SimonettiIT OperationsCommented:
0
ShillingAuthor Commented:
Richie,
thx for quick repsonse.
id 1610 as the virgin said to the bishop - looks gr8 but i havent got a clue what to do with it.
can u tell me how to get a handle on it.
every time i type a qwerty key i would like it to echo that key...

so if i add a form with a label1
i would like that label to echo the qwerty key press.

c = TheKeyPressed
so c = ????????????????????
label1.caption = c


thx again -
id 728 crashed me out but thats another story more to do with the thin ice im developing on than anything else.
rgds
Shilling
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Richie_SimonettiIT OperationsCommented:
1610: You have to save/register dll at windows/system directory.
From there you can add ato your project (project->references) and work with from there.
What is the specific problem?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ShillingAuthor Commented:
Richie,

r u asking re initial question.

i am writing a program that sits sits alongside a proprietary client. It is meant to keep track of what that client is doing. This is achieved by clicking on images on myForm or typing in two letter representations of those  images, etc eg 's' & '7'.

The proprietary client takes focus as is only right. To get the 's7' in at the moment you have to click on myForm to get it to register the 'a' and then the 's'.

So i need something to override this. ie run a program that polls keybd and passes values to my prog, whomever has focus.

or my prob with 16:10
i would thought it would be a basic ms requirement to offer a facility to poll the keybd. I am finding the code in 1610 verbose and am confused as to what to actually call to get the keybd vals. A line of code, that gave me the handle i want, would open the door for me and i could go from there.

is that pos?

thx again.

rgds
Shilling






0
ShillingAuthor Commented:
Richie,
im running from an environment where i cant reboot the machine - it clears my space entirely - and i cant register anything with windows - (thin ice) - this is why 16:10 wont run - no prob if it works i can pull it in later on the dev cycle when cirumstance have changed.

I just dont understand why this isnt standard vb fare - but thats not ur pob.
thx very much for help.

rgds
denis
0
ShillingAuthor Commented:
amazingly swift response time.
rgds
Shilling.
0
Richie_SimonettiIT OperationsCommented:
Well, it worked!

A simple way (i don't know if it meets what you need)
Set Form's keypreview property to true, add a label (label1) with caption=""

in Keypress event of form, paste this:
Private Sub Form_KeyPress(KeyAscii As Integer)
label1.caption=label1.caption &  chr$(keyascii)
End Sub

It will not work with backspace. To do so we have to do in other way.
0
ShillingAuthor Commented:
Richie,
but the form will always have to have focus or it doesnt work and as i am using this form to add value to a proprietary client which the user is constantly clicking and entering things into this cant be the case can it?
to work the user has to
click and enter in otherForm
then ...
click myForm
before they type in the keys to be caught
which is not practible. unless u know diferent!
0
ShillingAuthor Commented:
Richie,
but the form will always have to have focus or it doesnt work and as i am using this form to add value to a proprietary client which the user is constantly clicking and entering things into this cant be the case can it?
to work the user has to
click and enter in otherForm
then ...
click myForm
before they type in the keys to be caught
which is not practible. unless u know diferent!
0
ShillingAuthor Commented:
Richie,
but the form will always have to have focus or it doesnt work and as i am using this form to add value to a proprietary client which the user is constantly clicking and entering things into this cant be the case can it?
to work the user has to
click and enter in otherForm
then ...
click myForm
before they type in the keys to be caught
which is not practible. unless u know diferent!
0
ShillingAuthor Commented:
Richie,
but the form will always have to have focus or it doesnt work and as i am using this form to add value to a proprietary client which the user is constantly clicking and entering things into this cant be the case can it?
to work the user has to
click and enter in otherForm
then ...
click myForm
before they type in the keys to be caught
which is not practible. unless u know diferent!
0
Richie_SimonettiIT OperationsCommented:
As i said, i didn't know the complete scenario so my first post is what you need.
0
ShillingAuthor Commented:
Richie,
thx for all the help but i have stated in the original post: "the routines are not linked to anything that has focus - so i cant use a text box or form key handler."

ive since found an answer from one of your other experts
Q_20049306.html
which talks of directx - any comments?

0
Richie_SimonettiIT OperationsCommented:
On that link, there are comments from Ark, which is the author of the code at first link posted by me.
i don't know about Directx.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.