473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

best way to stop arrow key functionality

I've got a c# winform control that I've created. Any time I press
down arrow or up arrow, even though I try to handle the key, it tries
to take focus away from my control. I've tried this with a bare
example control and it does the same thing so it's not something I'm
doing (I think at least). Anyone know how to prevent the arrow keys
from removing focus from a control?
Nov 17 '05 #1
1 1494
Hi,

If you really want to go deep to the message to handle the arrow just
override the WndProc and catch the message before is sent to the owner.

Hope this helps
Salva
"timma" wrote:
I've got a c# winform control that I've created. Any time I press
down arrow or up arrow, even though I try to handle the key, it tries
to take focus away from my control. I've tried this with a bare
example control and it does the same thing so it's not something I'm
doing (I think at least). Anyone know how to prevent the arrow keys
from removing focus from a control?

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
2
by: Claire Streb | last post by:
Dear Microsoft, You make some great products, really, but I have a request: Please stop taking away functionality from your users. 1) In Visual Studio 6, we had two output folders, Debug and...
11
by: Rlrcstr | last post by:
How can you detect when an arrow key gets pressed? Doesn't seem to trigger a KeyPress or KeyDown event. Thanks. Jerry
2
by: Phil Galey | last post by:
I have a Panel control docked on all sides on a form and the panel control contains a PictureBox. I'm using the KeyDown event of the form to respond to the and keys for resizing the image and the...
2
by: PJ6 | last post by:
When I hit an arrow key, I want to be able to change the focus from cell to cell just like in Excel. I see two ways of doing this. First, emitting in script a function call in each cell on key down...
5
by: gw7rib | last post by:
I'm writing a program which has "notes" - these can appear on the screen as windows with text in. It is possible to create an "index note" - at present, this will contain a list of the titles (or...
6
by: sjoshi | last post by:
I have a derived class OraBackup which has a method that calls stored procedure on Oracledb to get status of backup job. Now the base class publishes an event like this: public delegate void...
0
by: Jacob | last post by:
I'm just trying VS2005 in Vista and have noticed that the control+shift+ right or left arrow functionality is different than expected (highlight work next to cursor). I think this is a vista...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.