Solved

CheckBox Up/Down intercept

Posted on 1998-12-17
1
136 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Suggested Courses
Course of the Month4 days, 23 hours left to enroll

636 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