473,382 Members | 1,736 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,382 software developers and data experts.

Control the input cursor?

As the textbox is focused,if I press the keys up/down arrow instead of
other keys like a,b,c......
the input cursor moves left and right.Now its the problem,I want the
cursor stay where it was(stop moving), as I press the up/down key.Can I
do that through recoding the textbox's events in c#?

I appreciate everyone can help me,thanks in advance~

Mar 4 '06 #1
2 1972
Hello Rader,

Add KeyDown handler for your control and use this code

if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down)
{
e.Handled = true;
}

R> As the textbox is focused,if I press the keys up/down arrow instead
R> of
R> other keys like a,b,c......
R> the input cursor moves left and right.Now its the problem,I want the
R> cursor stay where it was(stop moving), as I press the up/down key.Can
R> I
R> do that through recoding the textbox's events in c#?
R> I appreciate everyone can help me,thanks in advance~
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 4 '06 #2
Oh,It works.
thank you very much~

Mar 4 '06 #3

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

Similar topics

3
by: KathyB | last post by:
Hi, I'm trying to find a way to validate input text boxes where I don't know the names until the page is rendered. I've got 2 validate functions that fire with the onsubmit button of a "mini" form...
9
by: Gary Holt | last post by:
We have a problem demonstrated by the following HTML document. To see the problem type HV in the first field then use the mouse cursor to click into the Staff code input box. You will find that...
4
by: BBFrost | last post by:
We have a data entry application written within Framework 1.0 that contains 20+ custom user controls. The controls overlay each other so that only one custom control is visible at a time. What...
2
by: Craig | last post by:
I'm trying to do this within a control I've created: Cursor.Current = Cursors.WaitCursor; During the initialization of the parent form, my control gets added to the form, and while the control...
11
by: trinitypete | last post by:
Hi all, I have a user control that uses control literal to build a heading with a link, and a div containing links below. As the link heading is hit, I want to change the style of the div,...
10
by: Dennis D. | last post by:
Hello: There are a series of textboxes (x.text, y.text, z.text etc.) in which user input is expected. As: dtmX=CDate(x.text) dtmY=CDate(y.text) dtmZ=CDate(z.text) where x, y, and z.text...
0
by: stevenhaochen | last post by:
I add a user control (a simple textbox control) to customize datagridview column to test how to add user control to datagridview. I found a weired behavior. I can not input "q", "!", "#". But I...
5
by: mtgrizzly52 | last post by:
First thing, because of you all and this web site, I am building a first class time saving database for my fellow workers to use. My really dumb questions is this. I have a control in a subform...
5
by: colin | last post by:
Hi, Ive got a 3d model editor wich im developing with XNA c# development environment, using the game window to display the wireframe mesh in 3d. however I need to use some other windows too,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.