Hi,
I have a problem... I wrote a little VB6-program, which the user can hide
when he wants to do so (no form is visible, not even in the taskmanager).
To make the program visible again (the VB-form on the screen), the user has to type
the word "RETURN".
So I needed to capture keystrokes, which I did with the 'getasynckeystate'-function.
I put this function in a timer, but I have one problem with it : I capture keystrokes
sometimes more than the key is being pressed (because the timer-event occurs more than needed).
On the other hand, I sometimes don't capture the keystroke at all..(because it was pressed a little
bit too fast and the timer was too slow this time..).
When a user wants to see my program back on the screen, the program sometimes captures
"RRETURN" or "RETRN" or something like this, with the result that the program doesn't become visible for the
user at all.
My question : is there a better function to capture whatever keystroke hit by the user (even when the form is
not visible and doesn't have the focus), or can somebody tell me how to do this in a correct way using the
'getasynckeystate'-function ????????????????
THANKS
nick
I have a problem... I wrote a little VB6-program, which the user can hide
when he wants to do so (no form is visible, not even in the taskmanager).
To make the program visible again (the VB-form on the screen), the user has to type
the word "RETURN".
So I needed to capture keystrokes, which I did with the 'getasynckeystate'-function.
I put this function in a timer, but I have one problem with it : I capture keystrokes
sometimes more than the key is being pressed (because the timer-event occurs more than needed).
On the other hand, I sometimes don't capture the keystroke at all..(because it was pressed a little
bit too fast and the timer was too slow this time..).
When a user wants to see my program back on the screen, the program sometimes captures
"RRETURN" or "RETRN" or something like this, with the result that the program doesn't become visible for the
user at all.
My question : is there a better function to capture whatever keystroke hit by the user (even when the form is
not visible and doesn't have the focus), or can somebody tell me how to do this in a correct way using the
'getasynckeystate'-function ????????????????
THANKS
nick