473,465 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Datagridview use ENTER key instead of the TAB key.

Hi,

I am struggling with folowing problem,
I am a beginner of vbnet 2005
I have a datagridview and want to use ENTER key to move instead of the TAB
key.

On msdn i have found the code to use,
http://msdn2.microsoft.com/en-us/lib...dialogkey.aspx

I alreay made the Public Class CustomDataGridView
But I do not know how to declare and use the class on a correct way.
Is there someone who could me explain how to or send me an exxample?

Many thanks in advance
Marc.

================================================== =====
About
DataGridView.ProcessDialogKey Method
Processes keys, such as the TAB, ESCAPE, ENTER, and ARROW keys, used to
control dialog boxes.
Visual Basic (Declaration)
Protected Overrides Function ProcessDialogKey ( _
keyData As Keys _
) As BooleanVisual Basic (Usage)
Dim keyData As Keys
Dim returnValue As Boolean

returnValue = Me.ProcessDialogKey(keyData)
================================================== ============
Nov 9 '06 #1
1 9178
Hi,

http://www.vb-tips.com/dbpages.aspx?...5-5b9aca81e27c

Ken
------------------------
"Scotty" <Ma**@nomails.invalidwrote in message
news:OX*************@TK2MSFTNGP03.phx.gbl...
Hi,

I am struggling with folowing problem,
I am a beginner of vbnet 2005
I have a datagridview and want to use ENTER key to move instead of the
TAB key.

On msdn i have found the code to use,
http://msdn2.microsoft.com/en-us/lib...dialogkey.aspx

I alreay made the Public Class CustomDataGridView
But I do not know how to declare and use the class on a correct way.
Is there someone who could me explain how to or send me an exxample?

Many thanks in advance
Marc.

================================================== =====
About
DataGridView.ProcessDialogKey Method
Processes keys, such as the TAB, ESCAPE, ENTER, and ARROW keys, used to
control dialog boxes.
Visual Basic (Declaration)
Protected Overrides Function ProcessDialogKey ( _
keyData As Keys _
) As BooleanVisual Basic (Usage)
Dim keyData As Keys
Dim returnValue As Boolean

returnValue = Me.ProcessDialogKey(keyData)
================================================== ============
Nov 26 '06 #2

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

Similar topics

5
by: Alan Zhong | last post by:
i am trying to similate an "ENTER" as a key to switch focus in a sequence of text inputs. i don't want to use "event.keyCode" since i want to do additional testing before i decide which text input...
8
by: EBG | last post by:
I have a simple email form on my site but getting screwy results because I know alot of users are hitting "enter" instead of tab when doing the form. When they hit enter the entire form is...
2
by: Keith Smith | last post by:
I would like to tab through fields by using the "Enter" key instead of the "Tab" key. I set the KeyPreview on my Form to True and then I used this code upon Form_KeyUp if...
2
by: JP | last post by:
Hi, It's a login screen, so users enter their ID/Password and hit <ENTER> instead of clicking on Login button. But when they hit <ENTER> an Image Button gets clicked. I want to make my Login...
2
by: nicholas | last post by:
How can I disable the enter key on an asp.net page? As the default button is the first on the page, and as the enter key clicks the default button, and as my first button on the page is th...
2
by: Marcel Saucier | last post by:
Hello, I've learned with leave & lostfocus on a text box. When I input data to a text box, I have to use the TAB key to go to the next textbox. How can I use the ENTER key to go to the next...
2
by: pemigh | last post by:
Client's fingers have been well trained on another application to wrap lines by hitting shift-enter, and wants the same in Access application. Changing "enter key behavior" for controls is not...
2
by: Ivan Jericevich | last post by:
I am building my first program in VB 2005 Express Edition and considering I'm a BBC quite chuffed with my progress. All the data entries work off the TAB Key in run mode, how do I get the ENTER or...
8
by: Jeff | last post by:
A client wants a press of the Enter key in a field on a continuous form to grab the value of that field from the previous record. But if they have typed a value and then hit Enter it shouldn't. ...
7
by: Mike | last post by:
i have a small difficulties with BindingSource and dataGridView bind db has properly opened and bind doesn't works. Unfortunately I didn't find any good example how to connect MS Access with...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.