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

when a form is shown, how to focus to a button in C#?

??
Nov 16 '05 #1
4 967
You can set the propery AcceptButton to the one that you want to have the
focus, when the user presses ENTER, the click event will raise.

Hope this helps

Steven Lewis

"John" <to*@sohu.com> escribió en el mensaje
news:Ov**************@TK2MSFTNGP09.phx.gbl...
??

Nov 16 '05 #2
Call the Control class's Focus method, as in button.Focus();

John wrote:
??


Nov 16 '05 #3
thank guys!

"Steven Lewis" <am*******@hotmail.com> дÈëÓʼþ
news:Oy**************@TK2MSFTNGP12.phx.gbl...
You can set the propery AcceptButton to the one that you want to have the
focus, when the user presses ENTER, the click event will raise.

Hope this helps

Steven Lewis

"John" <to*@sohu.com> escribi?en el mensaje
news:Ov**************@TK2MSFTNGP09.phx.gbl...
??


Nov 16 '05 #4
thanks
<La****@drmworld.com> ????
news:11**********************@o13g2000cwo.googlegr oups.com...
Call the Control class's Focus method, as in button.Focus();

John wrote:
??

Nov 16 '05 #5

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

Similar topics

3
by: KathyB | last post by:
Hi, I'm trying to find a way to validate input text boxes where I don't know the names until the page is rendered. I've got 2 validate functions that fire with the onsubmit button of a "mini" form...
5
by: WindAndWaves | last post by:
Hi Gurus I have a very simple question this time. I have a continuous form with a textbox (ID number) and a label. The label has a on_click event: msgbox me.id.value If I click on the...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
0
by: melanieab | last post by:
Hi, I can't begin to understand this one. I have a form with a tabcontrol. When I first enter one of the pages (whether by tabbing or opening the form), I say to focus on a button. It does focus...
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...
3
by: Patrick [MSFT] | last post by:
Let me preface this with the goal I'm trying to achieve is mimic a feature of another language (Dexterity used by Microsoft Dynamics) and so while a filling a drop down list is a workable solution...
1
by: google | last post by:
I have a form with several subforms. Users enter the data, then on the parent there is a command button that runs code to generate a .pdf document from a report based on the data they are working...
1
by: Claire | last post by:
I'm writing an application with custom skinned controls. I have a text editor form with a rich edit control. Because there's no toolbuttons in the skinned control set, I have to use normal ones for...
2
by: Joergen Bech | last post by:
Hope someone has a solution or some suggestions for this. This cannot be right?!? Problem: I have multiple non-modal forms open at the same time. One or more of these forms have a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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.