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

Keys.Enter

a
what should i do to prevent enter key from work i do that in prive sub

but i need cancel the event

what is the code i need?

Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

If e.KeyCode = Keys.Enter Then

' the code to canel enter from work what i need thank you

End If

End Sub
Jun 27 '08 #1
2 2281
e.Cancel = True
"a" <a@a.netwrote in message news:uE**************@TK2MSFTNGP02.phx.gbl...
what should i do to prevent enter key from work i do that in prive sub

but i need cancel the event

what is the code i need?

Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

If e.KeyCode = Keys.Enter Then

' the code to canel enter from work what i need thank you

End If

End Sub

Jun 27 '08 #2
I think e should have an handled property. You just need to set it to
true.

See if it works.

Cheers!
Cyril Gupta
Jun 27 '08 #3

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

Similar topics

31
by: Robert Brown | last post by:
Let's say I have a type hierarchy: (just an example) the general entity customer: CREATE TABLE customer(customer_id int, customer_name varchar(250), customer_type int) three specific...
0
by: OC | last post by:
Because of the requirements on a high-speed data entry form, I need to reliably trap certain keys (specifically the "/", "*", "-", and "+") keys on the 10-key pad and treat them as "Function keys"....
2
by: strah | last post by:
I am trying to detect when a user uses Tab key while with the KeyDown event of the combobox. It seems to work fine with all the Keys (Enter, T, ...) but not with the Tab key (e.KeyCode = Keys.Tab)....
1
by: Jim Hubbard | last post by:
Why isn't the Keypress event of the System.Windows.Form.ToolStripComboBox triggered by hitting the Enter key? I cannot trap Keys.Enter or Keys.Return in the Keypress event.
4
by: Broeisi | last post by:
Hello, I'm trying to write a console based program in C in Linux. I want to use the function keys in my program, but I don;t know how to let the C program know when for exmaple the F1 key is...
115
by: LurfysMa | last post by:
Most of the reference books recommend autonum primary keys, but the Access help says that any unique keys will work. What are the tradeoffs? I have several tables that have unique fields. Can...
3
by: GS | last post by:
If I were to capture enter key on keyup event of an GUI object like comboBox box, How do I avoid killing ctrol-c, controlv, controlx, shift-insert, shiftdelete, contrl-insert
4
by: boopsboops | last post by:
Hi thescripts people, I hope I'm in the right forum for Visual Basic Dotnet (VS 2005). I am trying to make a custom control in which you can nudge a point around using the arrow keys. Actually,...
0
by: thirunavukarasukm | last post by:
Hai... How to Usercontrols with Shortcut Keys... I am creating one windows apllication.. the apllication contain many form.. in one form i am used one usercontrol(parent control)..
1
by: Marius Horak | last post by:
Is it my PC or what? Keys.Enter and Keys.Return shows as LButton | MButton | Back. Keys myKey = Keys.Enter; Can anyone confirm this? MH
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:
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
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
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.