Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C Sharp only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
C Sharp
Key Down Event in Text Box
Key Down Event in Text Box
Collapse
This topic is closed.
X
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
orekinbck@yahoo.com.au
#1
Key Down Event in Text Box
Nov 17 '05, 04:00 AM
Hi
How do I catch a SHIFT TAB in the key down event of a text box?
Thanks
Bill
Morten Wennevik
#2
Nov 17 '05, 04:01 AM
Re: Key Down Event in Text Box
Hi Bill,
The TextBox KeyDown event won't receive a TAB unless you set the TextBox.Multili ne = true as well as TextBox.Accepts Tab = true. If this is unwanted you can however override PreProcessMessa ge in an inherited TextBoz
class MyTextBox : TextBox
{
public override bool PreProcessMessa ge(ref Message msg)
{
if((int)msg.WPa ram == 9 && Control.Modifie rKeys == Keys.Shift)
MessageBox.Show ("SHIFT-TAB");
return base.PreProcess Message (ref msg);
}
}
--
Happy coding!
Morten Wennevik [C# MVP]
Comment
Post
Cancel
orekinbck@yahoo.com.au
#3
Nov 17 '05, 04:01 AM
Re: Key Down Event in Text Box
Thanks for that!
Bill
Comment
Post
Cancel
orekinbck@yahoo.com.au
#4
Nov 17 '05, 04:01 AM
Re: Key Down Event in Text Box
Thanks Morten
Regards
Bill
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment