Event for a KEYDOWN (OpenInsight Specific)
At 16 SEP 1998 06:38:03PM Greg James, ISIS, Inc. wrote:
Is it possible to display a message box or popup while a key (function, alt, etc.)is pressed and held, and then destroyed when the key is released?
I guess I'm looking for something similar to the BUTTONDOWN/BUTTONUP events, but for the keyboard.
At 17 SEP 1998 11:22AM Blaise(Revelation) wrote:
Greg,
Take a look at this knowledge base article on windows messages. You can replace the hex value with the ones below and also the name of the object you want to associate it with.
WM_KEYDOWN 0x0100
WM_KEYUP 0x0101
Good luckā¦
Blaise
At 17 SEP 1998 01:10PM Greg James, ISIS, Inc. wrote:
Blaise,
Thank you for the help. In the WINMSG event of an EDITLINE named LINE, I have the following script:
equ F5$ to 116
equ WM_KEYDOWN$ to 256
equ WM_KEYUP$ to 257
equ TRUE$ to 1
begin case
case wparam eq F5$begin casecase message eq WM_KEYDOWN$.LINE-]TEXT=The F5 button is being pressed.'case message eq WM_KEYUP$.LINE-]TEXT='case TRUE$end casecase TRUE$end case
RETURN 0
It works OK, but the text that is displayed in the editline 'flickers' while the F5 key is held down. Is there a better way to write this script to avoid this?
Also, I read the knowledge base article that you suggested. I don't have access to a C compiler that has the windows.h file. Where else could I find the hex values contained in this file in order to 'catch' other windows events? Thanks.
At 17 SEP 1998 01:34PM Aaron Kaplan wrote:
You can find the windows information on Microsoft's Web site. Look in the knowledge base there.
To stop the flicker, you'll have to add in a control variable. Set the var to tell that the key has already been pressed. If it's set, don't bother to redisplay the text. When the key is released, clear the var so it will be ready for the next time around.
akaplan@sprezzatura.com