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

On Key Event Call Button

Hello Everyone,
Is there a way to hit "ENTER"(or any other key) on the keyboard and
trigger a sepcific button?
I heard something about the onKeyDown event but was very confused with
it.
Could someone please explain how this could be done?
Thanks Alot,
Gil

Nov 13 '05 #1
4 1727
Since overriding a common key like the Enter key is unusual, perhaps
you should explain your real goal or reasons for doing this before your
design bites you...

I'm not trying to be judgmental, but overriding a key that pretty much
everyone already understands isn't a great idea, IMO...

Nov 13 '05 #2
Very good point!
I have a login in screen, and in addition to hitting the login button,
i would like the users to have the ability to hit enter once and have
it logged in.
At the momment after you type you password and hit "ENTER" the focus
than jumps to the next object which is the login in button, and only
than you press "ENTER" a second time for it to hit the "LOGIN BUTTON"
Is there a way for you to hit "ENTER" only once after typing in the
password, and have it immidiately activate the "LOGIN BUTTON"
Thanks,
Gil
pi********@hotmail.com wrote:
Since overriding a common key like the Enter key is unusual, perhaps
you should explain your real goal or reasons for doing this before your design bites you...

I'm not trying to be judgmental, but overriding a key that pretty much everyone already understands isn't a great idea, IMO...


Nov 13 '05 #3
Set your button's "Default" property to True, and the Enter key will call
its Click event.
Set the "Cancel" property to True, and the Esc key will call its Click
event.

HTH

"Giloosh" <gi*******@hotmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hello Everyone,
Is there a way to hit "ENTER"(or any other key) on the keyboard and
trigger a sepcific button?
I heard something about the onKeyDown event but was very confused with
it.
Could someone please explain how this could be done?
Thanks Alot,
Gil

Nov 13 '05 #4
Thank You MacDermott,
That solved the problem!
Gil

Nov 13 '05 #5

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

Similar topics

10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
12
by: Jack Russell | last post by:
My unstanding of all VB up to and including vb6 is that an event could not "interrupt" itself. For instance if you had a timer event containing a msgbox then you would only get one message. ...
15
by: Oleg Subachev | last post by:
I need to programmatically invoke from other class Click event of the Button on my Form. Button.OnClick method is protected, not public. How to perform this ? Oleg Subachev
9
by: jeff | last post by:
New VB user...developer... Situation...simplified... - I want to wrap a pre and post event around a system generated where the pre-event will always execute before the system event and the...
5
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a...
19
by: Daniela Roman | last post by:
Hello, I try to fire an event under a button click event and maybe anybody can give a clue please. I have let's say a WEB grid with PageIndexChanged event: private void...
3
by: GauravGupta | last post by:
i want to know that is it posible to call button click event before page load event on post back.... please help me....
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: 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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.