🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14509

Re: How to pass Key hit Info to another window?

#14509
From: Bruce Larrabee
Date: Sat, 09 Aug 2003 07:29
18 lines
1754 bytes
OK,

A1: 	Do you know how to intercept those keys from a window in general? 
If not use something like: OnKeyDown() in the window that IS
focused. Then send the Key hits over to your code on the window that 
ISN'T focused. BTW test `TShiftState Shift' to find out if the keys are 
shifted or if Ctrl or Alt are also pressed. I do this sort of thing all 
the time.

A2:		The answer to your second question is absolutely
Yes. I also do that all the time. One caveat though. You can't trap
`TAB'! Just about anything else though... Windows is VERY possessive
of `TAB'. To trap keys like `Return' make sure you set `KeyPreview' on
your Form to True. Or else Windows won't let you see them either.

Hope that helps,	

Bruce Larrabee
Technical Details
Message-ID: <3F34A2C1.30405@lycos.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <oprtcxmhynbq7az6@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9561c4f5215f3ff1
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-09 00:32:09 PST
Message-ID: <3F34A2C1.30405@lycos.com>
Date: Sat, 09 Aug 2003 00:29:05 -0700
From: Bruce Larrabee <zorwizard@lycos.com>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to pass Key hit Info to another window?
References: <oprtcxmhynbq7az6@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 66.178.140.106
X-Trace: newsgroups.borland.com 1060414108 66.178.140.106 (9 Aug 2003 00:28:28 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail