Solved

CheckBox Up/Down intercept

Posted on 1998-12-17
1
130 Views
Last Modified: 2013-12-26
The CheckBox control captures Up and Down keypresses and
treats them as BackTab and Tab.  I want to capture Up and
Down keypresses myself, but they don't make it through
to a KeyDown event procedure.

Does anyone know if/how I can pursuade a checkbox to leave
Up & Down keypresses alone?
(I'm working with VB 5 pro)
0
Comment
Question by:menicoll
1 Comment
 
LVL 3

Accepted Solution

by:
myqlG earned 100 total points
ID: 1489059
Since windows itself is intercepting the arrow keys and setting
focus elsewhere the only way you can capture that is with a
msghook of some kind.. and not natively from VB.
However.. a really really bad workaround (and IM almost
ashamed to post it here) is:
1 make a variable public as integer (k)
2. in keydown set k=0 then k=keycode
3 on lostfocus..check to see what k=
if k=some num (use a select case) then it wasnt because
of arrow keys..
if k=0 THEN it MAY have been an arrow key.

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now