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

AcceptButton

how do i create an AcceptButton in c#

user presses enter on textbox = button1.click

something like
AcceptButton = button1
Jun 25 '06 #1
1 2463
"Al Biheiri" <ab******@hotmail.com> wrote:
how do i create an AcceptButton in c#

user presses enter on textbox = button1.click

something like
AcceptButton = button1


You got it - "form.AcceptButton = button1;", System.Windows.Forms.Form
class, AcceptButton property.

-- Barry

--
http://barrkel.blogspot.com/
Jun 25 '06 #2

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

Similar topics

0
by: Kevin Smith | last post by:
I ran across a problem after installing the .NET framework Service Pack 1 on both XP and Server 2003, so I thought I would post the solution here in case anyone else ran across it. After...
0
by: Jeff Haumesser | last post by:
I have a form with the AcceptButton property set to a command button. I also have a RichTextBox on the same form. With the AcceptButton property set, I cannot enter a carriage return in the...
2
by: lostdreamz | last post by:
Ok, my situation is like this. I have a form with a few text boxes each with a 'validating' event, OK & Cancel buttons, and have the AcceptButton/CancelButton/DialogResult properties all set. ...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
1
by: Jeff | last post by:
Hello all. I'm trying to figure out exactly what is going on here. I'm getting different results on different forms, and it's driving me nuts. For example, I have a form called FormFinish....
2
by: Barney | last post by:
Hi, This is my first query in google groups. I expect to donīt do it wrong, and excuse me for my english, i havenīt used it for years... Iīm making a user component that inherits from a textbox....
0
by: Karsten Sosna | last post by:
Hello NG, i have a problem with the AcceptButton in VB.Net and C#. I have an empty project with one form. On this form i take two buttons(Button1 and Button2). Now i set the the...
2
by: sonicm | last post by:
Hi, I have a search for where we want the user to enter the search criteria in at the top and press enter, then the results are shown in a datagrid which we set the focus to. Once they select...
1
by: Tony Johansson | last post by:
Hello! I'm reading a book which mentioned about this AcceptButton property for a form which seems quite easy so I try to figure out how it works but I have run into some small problems. I...
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?
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...

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.