473,734 Members | 2,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fire a buttons click event when enter pressed in combo box

Hi

Im very much a beginner so apologies if my terminology is wrong. I have a
combo box with some items already loaded, the users can also enter a new
item. If they enter a new item and then press return on the keyboard I
want to fire a buttons click event.

I know I've seen how to do this somewhere but for the life of me cannot
remember where!

Thanks
Dec 3 '05 #1
2 2931
See Button.PerformC lick

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"kohoutec" <ko******@f2s.c om> wrote in message
news:op******** *******@laptop1 .kohoutec...
Hi

Im very much a beginner so apologies if my terminology is wrong. I have a
combo box with some items already loaded, the users can also enter a new
item. If they enter a new item and then press return on the keyboard I
want to fire a buttons click event.

I know I've seen how to do this somewhere but for the life of me cannot
remember where!

Thanks

Dec 3 '05 #2
On Sat, 03 Dec 2005 12:40:30 -0000, Bob Powell [MVP]
<bob@_spamkille r_bobpowell.net > wrote:
See Button.PerformC lick


Thanks Bob. I actually found what I was after using the forms AcceptButton
property, but any info is useful info at the moment.

Jon
Dec 3 '05 #3

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

Similar topics

12
7380
by: SJ | last post by:
Hope someone can help me out there I'm struggling with a particular problem... I have a form with many tab pages. On one tab page I've got a button which when clicked with a mouse adds items into a datagrid. When a user presses the enter key on this button I want the mouse click event to be activated but instead the tab page's validating event is called. I understand that this behaviour is by partly by design (Accept button etc) but I...
4
2752
by: sowencheung | last post by:
Hi, all The scenario is like this: I have a master page, contains two user controls, one is a search control, another is a login control. The server-side <form> is in the master page, that's of course. It seems the search control is rendered first, when I stay in the
3
4284
by: Robert W. | last post by:
I'm new to ASP.net programming so excuse my ignorance if the following question seems overly simplistic. I've created a simple Login form with 3 primary WebControls: - A TextBox for the Username - A TextBox for the Password - A Button labelled "Submit" If the user enters a correct username/password combination then he's taken to another page. But if either or both are incorrect then a simple message
3
2381
by: David Lozzi | last post by:
Howdy, I'm using asp.net 2.0 and am trying to get one text box on the page, after the user presses enter, to "click" a specific button. I copied the javascript I used for a .net 1.1 web app I did a while ago but it doesn't appear to work with .net 2.0? Below is my script. Any ideas? <script language="javascript"> function clickButton(e, buttonid){
3
2590
by: Fred | last post by:
In the enter event of a combo box, how to know how this control got the focus : - by clicking on it with the mouse - with the tab key - with the Select method of the control class I will want to do an action only if the combo box received focus after a tab key press. Thanks Fred
19
4756
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 DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
1
5870
by: dana1 | last post by:
I have a form with several combo boxes in the header used to determine the records that will be displayed on the form. When I tab or enter from the last combo box in the header, I want the focus to move to the first control on the form. When I Shift+tab from the first control on the form, I want the focus to move to the last control in the header. The form is a continuous form. The first control on the form is either a text box or a combo...
18
3960
by: Shocky | last post by:
Hi there, I am trying to detect whether my IE6 users have pressed both right and left mouse buttons simultaneously in my Javascript code, by using: if(event.button==3) {alert("Both right and left mouse buttons pressed");} I am calling the above code on mousedown or mouseup events.
1
7019
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the page has multiple button such login page with a search function somewhere around, then it's not respond properly. I have attached a brief example of two text boxes and two button. When ever a key is press on textbox one, I want to trigger...
0
8776
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9182
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3261
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 we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.